-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5c92b46
commit 019332a
Showing
10 changed files
with
95 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
const TurboSelf = require('turboself-api') | ||
|
||
async function main() { | ||
let client = await TurboSelf.authenticateWithCredentials({ username: "your_email", password: "your_password" }) | ||
let siblings = await client.getSiblings() | ||
let evening = await client.canBookEvening() | ||
console.log("Number of siblings\x1b[34m » \x1b[1;32m" + siblings.length + "\x1b[0m") | ||
console.log("Can book evening\x1b[34m » \x1b[1;32m" + evening) | ||
} | ||
|
||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const TurboSelf = require('turboself-api') | ||
|
||
async function main() { | ||
let client = await TurboSelf.authenticateWithCredentials({ username: "your_email", password: "your_password" }) | ||
let balance = await client.getBalance() | ||
console.log(balance) | ||
} | ||
|
||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
const TurboSelf = require('turboself-api') | ||
|
||
async function main() { | ||
let client = await TurboSelf.authenticateWithCredentials({ username: "your_email", password: "your_password" }) | ||
let weeksAvailable = await client.getBookingWeek() | ||
|
||
for (let week of weeksAvailable.weeksNumber) { | ||
const bookings = await client.getBookingWeek(week) | ||
console.log({ bookings }) | ||
} | ||
} | ||
|
||
main() |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
const TurboSelf = require('turboself-api') | ||
|
||
async function main() { | ||
console.log("\x1b[0mFetching etablishments ID 287\x1b[0m") | ||
const search = await TurboSelf.getEtablishment(287) | ||
console.log("Name\x1b[34m » \x1b[1;32m" + search.name + " \x1b[0m\x1b[0m") | ||
console.log("Addresse\x1b[34m » \x1b[1;32m" + search.geolocation?.address1 + " " + search.geolocation?.zipCode + " " + search.geolocation?.city + " \x1b[0m\x1b[0m") | ||
console.log("Version\x1b[34m » \x1b[1;32m" + search.version + " \x1b[0m\x1b[0m") | ||
console.log("Code UAI\x1b[34m » \x1b[1;32m" + search.uai + " \x1b[0m\x1b[0m") | ||
console.log("Code 2P5\x1b[34m » \x1b[1;32m" + search.code + " \x1b[0m\x1b[0m") | ||
console.log("Monnaie\x1b[34m » \x1b[1;32m" + search.currencySymbol + " \x1b[0m\x1b[0m") | ||
console.log("Crédit minimum\x1b[34m » \x1b[1;32m" + search.minimumCredit + " \x1b[0m\x1b[0m") | ||
console.log("Repas minimum\x1b[34m » \x1b[1;32m" + search.minimumMeal + " \x1b[0m\x1b[0m") | ||
console.log("MAC Address\x1b[34m » \x1b[1;32m" + search.macServerAddress + "\x1b[0m\x1b[0m") | ||
console.log(" ") | ||
console.log("Élève peuvent utiliser les QRCode ?\x1b[34m » \x1b[1;32m" + search.permissions?.canStudentUseQrCode + "\x1b[0m\x1b[0m") | ||
console.log("Élève peuvent virer l'historique? \x1b[34m » \x1b[1;32m" + search.permissions?.canStudentSeeHistory + "\x1b[0m\x1b[0m") | ||
console.log(search) | ||
} | ||
|
||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const TurboSelf = require('turboself-api') | ||
|
||
async function main() { | ||
let client = await TurboSelf.authenticateWithCredentials({ username: "your_email", password: "your_password" }) | ||
let history = await client.getHistory() | ||
console.log(history) | ||
} | ||
|
||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const TurboSelf = require('turboself-api') | ||
|
||
async function main() { | ||
let client = await TurboSelf.authenticateWithCredentials({ username: "your_email", password: "your_password" }) | ||
let host = await client.getHost() | ||
console.log(host) | ||
} | ||
|
||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const TurboSelf = require('turboself-api') | ||
|
||
async function main() { | ||
let client = await TurboSelf.authenticateWithCredentials({ username: "your_email", password: "your_password" }) | ||
let latestPayment = await client.getLatestPayment() | ||
console.log(latestPayment) | ||
} | ||
|
||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
const TurboSelf = require('turboself-api') | ||
|
||
async function main() { | ||
console.log("\x1b[0mFetching etablishments in Paris (search results are limited to 20)\x1b[0m") | ||
const search = await TurboSelf.searchEstablishment("Paris", 20) | ||
for (const etab of search) { | ||
console.log("\x1b[34m» \x1b[1;32m" + etab.name + " \x1b[0mis running at version \x1b[1;32m" + etab.version + "\x1b[0m") | ||
} | ||
console.log(search) | ||
} | ||
|
||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters