Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/laurci/infoeducatie-api-client
API client for api.infoeducatie.ro
https://github.com/laurci/infoeducatie-api-client
Last synced: about 1 month ago
JSON representation
API client for api.infoeducatie.ro
- Host: GitHub
- URL: https://github.com/laurci/infoeducatie-api-client
- Owner: laurci
- Created: 2018-07-19T17:14:53.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-07-23T00:31:41.000Z (over 6 years ago)
- Last Synced: 2024-12-11T01:12:39.275Z (about 2 months ago)
- Language: TypeScript
- Size: 4.88 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This is the TypeScript/JavaScript client for the api.infoeducatie.ro
Check the API repository at: https://github.com/infoeducatie/infoeducatie-api
Sample usage:
```typescript
//typescript
import { InfoeducatieApi, Current } from "infoeducatie-api-client";(async _ => {
let api = new InfoeducatieApi();
let current: Current = await api.authorize("your-key").getCurrent();
if(current.is_logged_in) { // check is the current session is logged in
console.log(current.user.email); // will print the email of the currently logged in user
} else {
console.log("Could not authorize against Infoeducatie's API");
}
})();
```The client works with javascript as well... but i recommend using it with typescript :)
```javascript
//javascript
let { InfoeducatieApi } = require("infoeducatie-api-client");(async _ => {
let api = new InfoeducatieApi();let current = await api.authorize("your-key").getCurrent();
if(current.is_logged_in) { // check is the current session is logged in
console.log(current.user.email); // will print the email of the currently logged in user
} else {
console.log("Could not authorize against Infoeducatie's API");
}
})();
```Check the typings for more info on the usage! The DOCs of the API are pretty much missing (except for the API.md) so i had to reverse it using the ruby code :) Hope you enjoy!
## Want to contribute?
Here's how!