Skip to content

Commit

Permalink
Merge pull request #1 from MiGoller/develop
Browse files Browse the repository at this point in the history
First release
  • Loading branch information
MiGoller authored Apr 16, 2021
2 parents 5d7419c + 651da8d commit a84e422
Show file tree
Hide file tree
Showing 7 changed files with 2,072 additions and 1 deletion.
20 changes: 20 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"env": {
"es2021": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
}
}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 Skunkworx
Copyright (c) 2021 MiGoller (https://github.com/MiGoller/)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
71 changes: 71 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,73 @@
# xplora-api.js

An unofficial client library for the Xplora API.

## Features

- Simple and lightweight Xplora API client
- Promise-based API (works with `async` / `await`)
- Typescript support
- Isomorphic (works with Node / browsers)

## Install

```bash
$ npm add xplora-api.js
```

## Quickstart

Get your child's location information. ▶️ [Try it out](https://runkit.com/).

```js
const xpa = require("xplora-api.js");

async function main() {

// Create a new Xplora API handler
const gqlHandler = new xpa.GQLHandler("+<COUNTRYCODE>", "<PHONENUMBER W/O COUNTRYCODE>", "<YOUR SCRET PASSWORD>", "en-US", "");

// Login with the credentials above
const issueToken = await gqlHandler.login();

// Get my information
console.log("---=== My Info ===---");
console.dir(await gqlHandler.getMyInfo(), {depth: null, colors: true});

// Get the last location information for the first child in the array
console.log("---=== Letzte Ortung ===---");
console.dir(await gqlHandler.getWatchLastLocation(issueToken.user.children[0].ward.id), {depth: null, colors: true});
}

main();
```

## Changelog

0.1.0

- (MiGoller) First public release. Enjoy ;-)

## License

### MIT License

Copyright (c) 2021 MiGoller (https://github.com/MiGoller/)

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.
Loading

0 comments on commit a84e422

Please sign in to comment.