https://github.com/strvcom/ios-nights-backend-api
Node.js BE API for ios nights
https://github.com/strvcom/ios-nights-backend-api
ios ios-be ios-education
Last synced: about 1 year ago
JSON representation
Node.js BE API for ios nights
- Host: GitHub
- URL: https://github.com/strvcom/ios-nights-backend-api
- Owner: strvcom
- Created: 2019-01-23T09:52:37.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-06-09T13:40:30.000Z (about 5 years ago)
- Last Synced: 2025-01-24T01:43:40.405Z (over 1 year ago)
- Topics: ios, ios-be, ios-education
- Language: JavaScript
- Homepage:
- Size: 435 KB
- Stars: 2
- Watchers: 66
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## iOS nights API
[](https://travis-ci.com/strvcom/ios-nights-backend-api)
Api service for iOS nights workshop
`https://ios-nights.herokuapp.com`
### Endpoints
##### Authentication
| Method | Endpoint | Description | Params | Protected |
| :--- |:---------- |:------------| :----- | :--: |
| POST |`/register` | Register user and returns user object with token | `name`, `email`, `password`, `pictureUrl` | - |
| POST | `/login` | Login user and returns user object with token | `email`, `password` | - |
##### User
| Method | Endpoint | Description | Params | Protected |
| :--- |:---------- |:------------| :----- | :--: |
| GET | `/users/me` | Verify token and returns user object | - | Token |
| POST | `/users/me/picture/signed-url` | Get signed url for picture upload |`type` (MIME type) | - |
| PATCH | `/users/me/picture` | Update user's profile picture | `pictureUrl` | Token |
##### Lectures
| Method | Endpoint | Description | Params | Protected |
| :--- |:---------- |:------------| :----- | :--: |
| GET | `/lectures` | Return list of lectures | `?page`, `?perPage` - pagination | Token |
| GET |`/lectures/:id` | Return detail of lecture | `id` - ID of lecture | Token |
| PATCH | `/lectures/:id/attended` | Update user's lecture attendance | `attended` - `true/false` | Token |
| PATCH | `/lectures/:id/assignment-done` | Update users' lecture assignment status | `assignmentDone` - `true/false` | Token |
#### Authentication
For accessing protected endpoints you need to provide `Authorization` header
`Authorization: Bearer TOKEN`