Skip to content
This repository was archived by the owner on Mar 2, 2021. It is now read-only.

Commit 12a7137

Browse files
authored
Merge pull request #19 from internet4000/feature/merge-docs
merge docs
2 parents d529f25 + 98fd4cc commit 12a7137

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed

docs/readme.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# API URL
2+
- Dev endpoint [https://r4-api.now.sh](https://r4-api.now.sh)
3+
- (Future) Live endpoint [https://api.radio4000.com](https://api.radio4000.com)
4+
5+
# References
6+
7+
Check [here for te API source code](https://github.com/internet4000/radio4000-api).
8+
If you have any comment please open an issue on the present document.
9+
10+
# Version prefix
11+
`v1` is the latest version of the API.
12+
`/v1/:endpoint`: to query available endpoints.
13+
14+
# Endpoints
15+
- `/` (GET): link to this document
16+
- `/channels` (GET): all channels data
17+
- `/channels?queryParam.filterMethod=value`: filtered list of channel
18+
- queryParam: any value of the channel (e.g. `title` or `slug`)
19+
- filterMethod (optional)
20+
- `contains` [string]: the query parameter should be contained by the channel value
21+
- `icontains` [string]: same but case insensitive
22+
- `starts_with` [string]: the query parameter should be the start of the channel value
23+
- `gt` [integer]: the query parameter should be greater than the value
24+
- by default it will search for the exact value
25+
- value: a string for your search
26+
- `/channels/:channelId` (GET): specific channel data
27+
- `/channels/:channelId/tracks` (GET): specific channel tracks data
28+
- `/tracks/:trackId` (GET): specific track data
29+
- `/images/:imageId` (GET): specific image data
30+
31+
# Examples
32+
33+
- `channels?title.icontains=radio`: channel with a title containing (case insensitive) "radio"
34+
- `channels?tracks.gt=500`: channels with more than 500 tracks
35+
36+
# Models
37+
## channel
38+
- `id [string]`: if for this channel
39+
- `body [string]`: user description for this channel
40+
- `slug [string]`: user generated unique identifier for a channel. It is used for its URL.
41+
- `title [string]`: user chosen name for this channel
42+
- `created [integer]`: timestamp, creation date for this channel
43+
- `updated [integer]`: timestamp, last time this channel was updated (when a new track is added)
44+
- `favoriteChannels [list]`: ids of channels added as favorite by this channel
45+
- `images [list]`: ids to images models on Radio4000
46+
- `isFeatured [boolean]`: is the channel featured on Radio4000's homepage
47+
- `link [string]`: one external link chosen by the channel owner
48+
- `tracks [list]`: list of track ids that are owned by this channel
49+
50+
## track
51+
- `id [string]`: id for this track
52+
- `title [string]`: user title for the track
53+
- `body [string]`: user description for this track
54+
- `channel [string]`: channel id of the channel owning this track
55+
- `created [integer]`: timestamp, creation date fot this track
56+
- `url [string]`: full URL to the track ressource on the content provider's website
57+
- `ytid [string]`: id if the track as defined by the content provider
58+
59+
## image
60+
- `id [string]`: id for this image
61+
- `channel [string]`: id of the channel that owns this image
62+
- `created [integer]`: timestamp, creation date for this image
63+
- `src [string]`: full URL pointing to the image ressource

0 commit comments

Comments
 (0)