Create activity

This commit is contained in:
Manuel Bouza
2019-02-11 10:14:09 +01:00
parent c9f589f223
commit 7b405a6de3
6 changed files with 60 additions and 14 deletions

View File

@@ -1,8 +1,8 @@
import axios from "axios"
export default class Client {
#client
#apiKey
#client;
#apiKey;
constructor({ subdomain, apiKey, clientVersion }) {
this.#apiKey = apiKey
@@ -20,7 +20,9 @@ export default class Client {
})
}
login = () => this.#client.post("session", { api_key: this.#apiKey })
login = () => this.#client.post("session", { api_key: this.#apiKey });
projects = () => this.#client.get("projects")
projects = () => this.#client.get("projects");
createActivity = activity => this.#client.post("activities", { activity });
}