Code Monkey home page Code Monkey logo

librus-api's Introduction

librus-api

npm License

Simple node.js Librus / Synergia scraping API module

Installation:

npm install librus-api

Usage

'use strict';
const Librus = require("librus-api");

let client = new Librus();
client.authorize("login", "pass").then(function () {
  // Send message to User 648158
  client.inbox.sendMessage(648158, "title", "body").then(() => { /** sucess */ }, () => { /** fail **/ });

  // Remove message with id 4534535
  client.inbox.removeMessage(4534535).then(() => { /** sucess */ }, () => { /** fail **/ });

  // List receivers
  client.inbox.listReceivers("nauczyciel").then(data => {});

  // List announcements
  client.inbox.listAnnouncements().then(data => {});

  // List all e-mails in folder(5) in page(2)
  client.inbox.listInbox(5).then(data => {});

  // Get message with id 2133726 in folder 6
  client.inbox.getMessage(6, 2133726).then(data => {});

  // List all subjects
  client.homework.listSubjects().then(data => {});

  // List subject homeworks, -1||undefined all
  client.homework.listHomework(24374).then(list => {});

  // Download homework description
  client.homework.getHomework(257478).then(data => {});

  // Get all absences
  client.absence.getAbsences().then(data => {});

  // Get info about absence
  client.absence.getAbsence(5068489).then(data => {});

  // Get timetable
  client.calendar.getTimetable().then(data => {});

  // Get calendar
  client.calendar.getCalendar().then(data => {});

  // Get event
  client.calendar.getEvent(4242342).then(data => {});

  // Get grades
  client.info.getGrades().then(data => {});

  // Get grade
  client.info.getGrade(23424234).then(data => {});
  
  // Get scoring grade
  client.info.getPointGrade(234242234).then(data => {});
  
  // Get name, surname and other account info
  client.info.getAccountInfo();

  // Get lucky number
  client.info.getLuckyNumber().then(data => {});

  // Get notifications
  client.info.getNotifications().then(data => {});
});

License

The MIT License (MIT)

Copyright (c) 2020/2021 Mateusz Bagiński Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

librus-api's People

Contributors

mati365 avatar xxsource98 avatar hubix9 avatar matisiekpl avatar diaxmanpl avatar kamchy avatar michaltcz avatar

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.