Code Monkey home page Code Monkey logo

webuntis's Introduction

WebUntis API

This is a NodeJS Wrapper for the JSON RPC WebUntis API.

The Documentation is available at https://webuntis.noim.me/

In case you need the Untis API Spec (pdf), you need to email Untis directly and ask. I am (legally) not allowed to publish it.

Note:

As I have not been a student for a long time, I currently have no access to any Untis services. If you want to share your login details with me for testing purposes, contact me via Telegram or other means (Homepage).

Examples

User/Password Login

import { WebUntis } from 'webuntis';

const untis = new WebUntis('school', 'username', 'password', 'xyz.webuntis.com');

await untis.login();
const timetable = await untis.getOwnTimetableForToday();

// profit

QR Code Login

import { WebUntisQR } from 'webuntis';
import { URL } from 'url';
import { authenticator as Authenticator } from 'otplib';

// The result of the scanned QR Code
const QRCodeData = 'untis://setschool?url=[...]&school=[...]&user=[...]&key=[...]&schoolNumber=[...]';

const untis = new WebUntisQR(QRCodeData, 'custom-identity', Authenticator, URL);

await untis.login();
const timetable = await untis.getOwnTimetableForToday();

// profit

User/Secret Login

import { WebUntisSecretAuth } from 'webuntis';
import { authenticator as Authenticator } from 'otplib';

const secret = 'NL04FGY4FSY5';

const untis = new WebUntisSecretAuth('school', 'username', secret, 'xyz.webuntis.com', 'custom-identity', Authenticator);

await untis.login();
const timetable = await untis.getOwnTimetableForToday();

// profit

Anonymous Login

Only if your school supports public access.

import { WebUntisAnonymousAuth, WebUntisElementType } from 'webuntis';

const untis = new WebUntisAnonymousAuth('school', 'xyz.webuntis.com');

await untis.login();
const classes = await untis.getClasses();
const timetable = await untis.getTimetableForToday(classes[0].id, WebUntisElementType.CLASS);

// profit

Installation

This package is compatible with CJS and ESM. Note: This package primary target is nodejs. It may also work with runtimes like react-native, but it will probably not work in the browser.

yarn add webuntis
# Or
npm i webuntis --save
# Or
pnpm i webuntis

ESM note:

If you use the esm version of this package, you need to provide Authenticator and URL if necessary. For more information, look at the User/Secret Login or QR Code Login example. This is not needed for username/password or anonymous login.

Notice

I am not affiliated with Untis GmbH. Use this at your own risk.

webuntis's People

Contributors

afink avatar akajuliaan avatar dependabot[bot] avatar dunklestoast avatar emilylange avatar high5-bot avatar himbeersaftlp avatar jauki avatar jeidnx avatar lebalz avatar luwol03 avatar marcel-kitzbichler avatar newan avatar nkilders avatar pvhil avatar thenoim avatar wolflu05 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

webuntis's Issues

Hate

Tom hat dich am September 11, 2018 at 06:59PM gehated

Add Messagecenter

It is possible to add the message center?

WebUntis/api/rest/view/v1/messages -> get all inbox messages

Hate

Tom hat dich am October 25, 2018 at 08:42PM gehated

Fix param types on getAbsentLesson

The .getAbsentLesson() method currently wants a number as start- and endDate, but throws an error, because it actually wants a Date object. These kinds of issues, would occur no more if #80 would be implemented (migrating the project to typescript).

Migrate the project to typescript

This should be fairly straight forward as the library only consists of one actual file.
Many devs would benefit from this (e.g. ESModule syntax, types that 100% align, extending the classes is easier, etc.).

Logical error in v2?

Just updated to v2 and well, it apparently doesnt like the server anymore:

Error: Failed to login. Server didn't return a session id.
    at WebUntisQR._otpLogin (/home/container/node_modules/webuntis/dist/webuntis.js:648:13)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async WebUntisQR.login (/home/container/node_modules/webuntis/dist/webuntis.js:748:12)

Caused by (compiled) L648:

if (response.headers && response.headers["set-cookie"] && this._getCookieFromSetCookie(response.headers["set-cookie"]))
      throw new Error("Failed to login. Server didn't return a session id.");

But the last check in the if clause doesnt make sense, it should have a ! in front of it - esp as the next line uses it:

const sessionId = this._getCookieFromSetCookie(response.headers["set-cookie"]);

Added the ! in my code and its working completely fine then 🤷

Uncompiled:

throw new Error("Failed to login. Server didn't return a session id.");

Hate

Tom hat dich am September 11, 2018 at 06:58PM gehated

New function

Hello, I need a function for converting a untis date into js date object.

Get absences or periods present/checked for student

Hello,
I'm trying to make an API call to get information on whether a student was present on a specific day.
I am successfully calling

the WebUntis API endpoint
GET {{EAP_URL}}WebUntis/api/rest/extern/v1/students/{{id}}
and the OneRoster WebUntis API endpoints (with two different sets of credentials (for the iServ/Moodle integration in the section platform))

I'm trying to make an API call to this endpoint
GET {{EAP_URL}}WebUntis/api/rest/extern/v1/timetable
But I'm getting Error 403 "Access is denied".

Can any of you guys tell me how to make that call work?
Do I need to set up a different set of credentials with the the correct permissions? (if yes, how?)

Or is there a different endpoint that I can call to get the data needed?

Thank you!

Add tests

Currently, there are no tests for the package.

We should at least add some basic tests.

videoCall

Hi, do you know anything about videoCalls?

My shool is starting to use that feature, but I cant get it via API..

On the Web, the information is sent via the data-request.

May I ask in the community forum for help?

"videoCall": {
                                "videoCallUrl": "abc.de or message",
                                "active": true
                            },

Hate

Tom hat dich am August 28, 2018 at 01:48PM gehated

Cancelled Lesson

Is there a way to check if a lesson on a specific date is cancelled?

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.

Since we didn’t receive a CI status on the greenkeeper/initial branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/.

Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please delete the greenkeeper/initial branch in this repository, and then remove and re-add this repository to the Greenkeeper App’s white list on Github. You'll find this list on your repo or organization’s settings page, under Installed GitHub Apps.

School name with spaces

If I type export SCHOOL=SZ II Utbremen, it raises Error: Failed to login. {"jsonrpc":"2.0","id":"error","error":{"message":"invalid schoolname","code":-8500}}.
But if I type export SCHOOL=SZ+II+Utbremen, the error is gone.

Hate

Tom hat dich am December 22, 2018 at 04:30PM gehated

Hate

Tom hat dich am October 28, 2018 at 04:40AM gehated

Causes for "Server didn't return any result."

I sometimes get this error and was wondering what could cause it, as webuntis itself seems to be always available.
Can I just try to repeat the request, or should I wait a few minutes before trying again?

Full error:

Error: Server didn't return any result.
    at WebUntisQR._request (/home/container/node_modules/webuntis/index.js:745:42)
    at async WebUntisQR.getOwnClassTimetableForRange (/home/container/node_modules/webuntis/index.js:438:16)```

Network Error / Refused to set unsafe header "User-Agent"

I am trying to use the WebUntis API in a React Native / TypeScript project on Stackblitz, but it keeps throwing this network error and I have no clue why.

image

I don't know if this has to do with the API, because I am new to react and APIs, so any help would be appreciated.

get teatcher with timetable

image
It's funny, because on the web untis page I can see my teachers, but on the mobile app i can't. Could it be that webuntis fetch the data an other way like the mobile app? And the mobile app use the offfical api?

Originally posted by @luwol03 in #29 (comment)

I am now in another class at the same school and still have the problem? Is there any way to fix this? Could we put there another function in the api wrapper that uses the route, the webui or app uses? Or should I extend that myself locally as this doesn't affect everyone?

EDIT:

Endpoint

GET https://neilo.webuntis.com/WebUntis/api/public/timetable/weekly/data?elementType=<elementType>&elementId=<elementId>&date=<date>&formatId=<formatId>

With the following parameters

name description example
<elementType> Element type for requesting the timetable. I think its like it is described in the "official" documentation under 14) parameters.type 5 (student)
<elementId> The element id to the elementType 453 (studentId)
<date> Start date of week. 2022-03-14
<formatId> If set to one, all types (1-5) are outputted into elements. If set to 2, the teachers are obmitted. Haven't figured out, for what this is useful. 1
The output looks like the following:
{
  "data": {
    "result": {
      "data": {
        "noDetails": false,
        "elementIds": [343],
        "elementPeriods": {
          "343": [
            // Normal lesson
            {
              "id": 54533,
              "lessonId": 56456,
              "lessonNumber": 34532,
              "lessonCode": "LESSON",
              "lessonText": "This lesson is very cool",
              "periodText": "",
              "hasPeriodText": false,
              "periodInfo": "",
              "periodAttachments": [],
              "staffText": "",
              "staffAttachments": [],
              "substText": "",
              "date": 20220311,
              "startTime": 800,
              "endTime": 845,
              "elements": [
                {
                  "type": 1,
                  "id": 343,
                  "orgId": 0,
                  "missing": false,
                  "state": "REGULAR"
                },
                {
                  "type": 2,
                  "id": 643,
                  "orgId": 0,
                  "missing": false,
                  "state": "REGULAR"
                }
              ],
              "studentGroup": "SG",
              "hasInfo": false,
              "code": 0,
              "cellState": "STANDARD",
              "priority": 5,
              "is": {
                "standard": true,
                "event": false
              },
              "roomCapacity": 0,
              "studentCount": 0
            },

            // lesson with absent teacher
            {
              "id": 43543,
              "lessonId": 564324,
              "lessonNumber": 45343,
              "lessonCode": "LESSON",
              "lessonText": "",
              "periodText": "eigenst. Arbeiten",
              "hasPeriodText": true,
              "periodInfo": "",
              "periodAttachments": [],
              "staffText": "",
              "staffAttachments": [],
              "substText": "eigenst. Arbeiten",
              "date": 20220318,
              "startTime": 1000,
              "endTime": 1045,
              "elements": [
                  {
                      "type": 1,
                      "id": 343,
                      "orgId": 0,
                      "missing": false,
                      "state": "REGULAR"
                  },
                  {
                      "type": 2,
                      "id": 0,
                      "orgId": 544,
                      "missing": false,
                      "state": "ABSENT"
                  },
                  {
                      "type": 3,
                      "id": 435,
                      "orgId": 0,
                      "missing": false,
                      "state": "REGULAR"
                  },
                  {
                      "type": 4,
                      "id": 434,
                      "orgId": 0,
                      "missing": false,
                      "state": "REGULAR"
                  }
              ],
              "studentGroup": "h1_CK",
              "hasInfo": true,
              "code": 0,
              "cellState": "SUBSTITUTION", // "cellState": "ROOMSUBSTITUTION",
              "priority": 3,
              "is": {
                  // "roomSubstitution": true,
                  "substitution": true,
                  "event": false
              },
              "roomCapacity": 0,
              "studentCount": 0
            }
          ]
        },
        "elements": [
          // all different element types which are associated in the elementPeriods section
          // below is an example for each one. In real this responded with about 200
          // different elements with different ids. I just cutted all out to minimize the response

          // Class
          {
            "type": 1,
            "id": 343,
            "name": "MCK",
            "longName": "Meine Coole Klasse",
            "displayname": "MCK",
            "alternatename": "",
            "canViewTimetable": true,
            "roomCapacity": 0
          },

          // Teacher
          {
            "type": 2,
            "id": 643,
            "name": "Fs",
            "canViewTimetable": false,
            "externKey": "",
            "roomCapacity": 0
          },

          // Subject
          {
            "type": 3,
            "id": 895,
            "name": "CF",
            "longName": "Cooles Fach",
            "displayname": "CF",
            "alternatename": "",
            "backColor": "#eeeeee",
            "canViewTimetable": false,
            "roomCapacity": 0
          },

          // Room
          {
            "type": 4,
            "id": 41,
            "name": "311",
            "longName": "10b",
            "displayname": "311",
            "alternatename": "",
            "canViewTimetable": false,
            "roomCapacity": 33
          },

          // Student
          {
            "alternatename": "",
            "canViewTimetable": true,
            "displayname": "Prakash Fernanda",
            "id": 456,
            "longName": "Prakash",
            "name": "Prakash7534",
            "roomCapacity": 0,
            "type": 5
          }
        ]
      },
      "lastImportTimestamp": 1647072062865
    }
  }
}  

In the elements section in the output I only get the teachers short names. So I probably need to make an request to the "official" getTeacher jsonrpc endpoint and match the ids.

And another downside of this is, that I don't get compleately cancelled lessons.

invalid school name

the schoolname from the webite is: OSZ+IMT

i think the + in the schoolname is not working here?

Fehler beim Login: Failed to login. {"jsonrpc":"2.0","id":"error","error":{"message":"invalid schoolname","code":-8500}}

Hate

Tom hat dich am September 11, 2018 at 06:58PM gehated

teaching content

I am trying to access the teaching content of my classes, but they don’t seem to be available. Does that feature not exist yet?

{ bkText: lesson.lstext, subsText: lesson.substText, infoText: lesson.info, remarkText: lesson.bkRemark, }

I tried all of these texts, but all are undefined for lessons with teaching content

unable to validate session

how do I validate a session, I use qr-code login, it logs in perfectly but I'm unable to verify the session an thus am unable to get any other data
here's the error log:

(node:2476) UnhandledPromiseRejectionWarning: Error: Current Session is not valid
    at WebUntisQR._request (/home/pi/RMUntis4/node_modules/webuntis/index.js:548:71)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async WebUntisQR.getOwnTimetableForToday (/home/pi/RMUntis4/node_modules/webuntis/index.js:252:16)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:2476) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:2476) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Getting a 'server didn't return any results' for timetable with parallel lessons

Unfortunately, for 11th and 12th grade the school decided to put all lessons in everybody's timetables. So my kids see lessons they don't have. However, it would still be nice to see which lessons are omitted.

But retrieving a timetable leads to an error. Not sure why. Potentially, because of the parallel lessons?

Example program

import { WebUntis } from 'webuntis';
const untis = new WebUntis('...');
await untis.login();
console.log(await untis.getTimetableForToday())

returns

C:\dev\Untis\node_modules\webuntis\dist\webuntis.js:564
      throw new Error("Server didn't return any result.");

Error: Server didn't return any result.
    at Base._request (C:\dev\Untis\node_modules\webuntis\dist\webuntis.js:564:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Base.getTimetableForToday (C:\dev\Untis\node_modules\webuntis\dist\webuntis.js:340:12)
    at async file:///C:/dev/Untis/app.js:13:13

I would love to provide you with the login data, if you have time to look further into this.

What is the base url for the school?

Im trying to get the timetables with this code, but I don't know what the base url is for myschool, the current code:

import { WebUntisAnonymousAuth, WebUntisElementType } from "webuntis";

const untis = new WebUntisAnonymousAuth(
  "SC-Celje",
  "https://ajax.webuntis.com/WebUntis/?school=sc-celje"
);

await untis.login();
const classes = await untis.getClasses();
const timetable = await untis.getTimetableForToday(
  classes[10].id,
  WebUntisElementType.CLASS
);
console.log(timetable);

Hate

Tom hat dich am September 11, 2018 at 06:58PM gehated

Hate

Tom hat dich am December 22, 2018 at 04:31PM gehated

Find out if lesson is exam

I was wondering if I somehow can find out if there is an exam in a specific lesson, for example gotten from a timetable. I could get all of the information about a lesson except for the red marked ones.
image

Timetable doesn't get returned in order

Hey,

When I get my Timetable using untis.getOwnTimetableForToday();, it gets returned in a completely random order.

Is there a way to sort it according to startTime or endTime?

If so please let me know. :)

Get request of timetable throws error

Hi,
I am using the WebUntis plugin as part of a module of the magic mirror and it is throwing error like this:
/home/pi/MagicMirror/modules/MMM-untis/node_modules/webuntis/index.js:233
...additionalOptions,
^^^
SyntaxError: Unexpected token ...
at Object.exports.runInThisContext (vm.js:78:16)
at Module._compile (module.js:543:28)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object. (/home/pi/MagicMirror/modules/MMM-untis/node_helper.js:2:15)
at Object. (/home/pi/MagicMirror/modules/MMM-untis/node_helper.js:132:3)

If I "correct" the syntax by removing the "..." then the code works, but the timetable request is not considering the range provided by additionalOptions.startDate and additionalOptions.endDate:
async _timetableRequest(id, type, startDate, endDate, validateSession = true) {
const additionalOptions = {};
if (startDate) {
additionalOptions.startDate = this.convertDateToUntis(startDate);
}
if (endDate) {
additionalOptions.endDate = this.convertDateToUntis(endDate);
}

    return this._request(
        'getTimetable',
        {
            options: {
                id: new Date().getTime(),
                element: {
                    id,
                    type
                },
                additionalOptions,
                showLsText: true,
                showStudentgroup: true,
                showLsNumber: true,
                showSubstText: true,
                showInfo: true,
                showBooking: true,
                klasseFields: ['id', 'name', 'longname', 'externalkey'],
                roomFields: ['id', 'name', 'longname', 'externalkey'],
                subjectFields: ['id', 'name', 'longname', 'externalkey'],
                teacherFields: ['id', 'name', 'longname', 'externalkey']
            }
        },
        validateSession
    );
}

Any idea how to fix it?
Regards se7en241

Weird error message when trying to log in anonymously

Hello
I am trying to log in with this POST:
{ method: 'POST', url: "/WebUntis/jsonrpc.do?school=Heyerdahl", data: { id: this.id, method: 'authenticate', params: { user: '#anonymous#', client: this.id }, jsonrpc: '2.0' }

But I get a weird error message in return:
Error: Failed to login. {"jsonrpc":"2.0","id":"DiscordBotUntisQuery","error":{"message":"Index: 1, Size: 1","code":-8998}}

Does anyone know if I am doing anything wrong, and what I am doing wrong?

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.

Since we didn’t receive a CI status on the greenkeeper/initial branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/.

Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please delete the greenkeeper/initial branch in this repository, and then remove and re-add this repository to the Greenkeeper App’s white list on Github. You'll find this list on your repo or organization’s settings page, under Installed GitHub Apps.

Use in React Native

Hello I wanted to use this library with React Native but this is not possible because React Native has no standard node modules what can I do?

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.

Since we didn’t receive a CI status on the greenkeeper/initial branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/.

Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please delete the greenkeeper/initial branch in this repository, and then remove and re-add this repository to the Greenkeeper App’s white list on Github. You'll find this list on your repo or organization’s settings page, under Installed GitHub Apps.

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.

Since we didn’t receive a CI status on the greenkeeper/initial branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/.

Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please delete the greenkeeper/initial branch in this repository, and then remove and re-add this repository to the Greenkeeper App’s white list on Github. You'll find this list on your repo or organization’s settings page, under Installed GitHub Apps.

Hate

Tom hat dich am December 22, 2018 at 04:30PM gehated

Expand the doc

I was wondering why my sessionid keeps getting invalid after roughly 10min.
So I investigated a bit...

As I turns out, the official API spec says

An application should always logout as soon as possible to free system resources on the server.

I propose adding this recommendation to the sdk doc. Furthermore, it might make sense to add the official spec pdf into the repo after the license has been clarified.

I wanted to discuss it before investing some time for a then rejected PR :)

Just a few questions

Hello,

I have got the api docs with a email to helpdesk. And now I have a few questions.

  1. What version of the documentation you're using? And how much pages you have? (Mine is from 20.09.2018 and has 19 pages)

  2. In mine there is nothing about getting homeworks and a few other stuff. Only json rpc and nothing about a rest API. Did you figured out the rest api yourself?

  3. The guy from the untis team, who send me the documentation said:

The query interval of your program must NOT be less than 60 minutes. Otherwise the query will be blocked by the system.

Have you any experience with testing your program? Did you got blocked?

  1. And in my sheet I can't find anything about the secret authentication and anonymous login. Did you figured out this also yourself?

Best regards.

Getting Room of timetable entry

I want to get the room number of this 'entry' in the for loop. When I query it, I only get '[object Object]'.

const time = parseInt('' + date.getHours() + date.getMinutes())

if (time >= 745 && time <= 915) {
	entries = timetable.filter(item=>item.startTime=="745")
	for (var i = entries.length - 1; i >= 0; i--) {
	        str = str + entries[i].sg + '\n'
	}
       console.log(str)
}

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.

Since we didn’t receive a CI status on the greenkeeper/initial branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/.

Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please delete the greenkeeper/initial branch in this repository, and then remove and re-add this repository to the Greenkeeper App’s white list on Github. You'll find this list on your repo or organization’s settings page, under Installed GitHub Apps.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.