https://github.com/willtpwise/live-hub-back
https://github.com/willtpwise/live-hub-back
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/willtpwise/live-hub-back
- Owner: willtpwise
- Created: 2017-09-07T22:25:18.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2018-08-16T22:58:20.000Z (almost 8 years ago)
- Last Synced: 2025-03-05T17:51:58.006Z (over 1 year ago)
- Language: PHP
- Size: 26.8 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# LiveHUB Backend
---
REST API & Data store
## Get users
Endpoint `/users/`
Make a post request to `/users/` to query one or more users/
### Options
The following params can be sent as post data
#### Field name
A field name representing an argument for filtering the results
```javascript
{
id: 1 // Return user 1, only
}
```
```javascript
// Return all users who's first name starts will 'will' and last name is
// exactly 'wise'
{
first_name: {
operator: 'LIKE',
value: 'will%'
},
last_name: 'wise'
}
```
#### Ordering
The order object in your post data allows you to control the order of results
```javascript
// Return results in alphabetical order, based on first_name
{
order: {
column: ['first_name'],
direction: 'ASC'
}
}
```
#### Limiting
Limit the number of results returned using the limit property in your post data
```javascript
{
limit: 10
}
```
By default the limit for results returned is `25`. You can remove this limit by
passing `-1`.
### Response value
The response value is a JSON object. Within it's body property will be an array
containing your results.
## Create Users
## Create user
```/users/create/```