-
Notifications
You must be signed in to change notification settings - Fork 3
/
API.txt
105 lines (84 loc) · 1.43 KB
/
API.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# Tweeting
Retrieve, post, and search tweets.
GET /tweets
Get all tweets, ever! Returns:
```js
{
"tweets": [
{
"status": "Everything happens so much",
"datetime": "2013-09-03T00:00:00",
"username": "horse_ebooks"
}
...
]
}
```
POST /:username/tweets
Post a new tweet as a user. Your status should be <= 140 characters! Submit a payload:
```
{
"status": "...text..."
}
```
GET /:username/tweets
Get all the tweets for a user. Returns:
```js
{
"tweets": [
{
"status": "Everything happens so much",
"datetime": "2013-09-03T00:00:00",
"username": "horse_ebooks"
}
...
]
}
```
GET /tweets?q=:pattern
Search for all tweets that include `:pattern`. See /tweets.
GET /:username/tweets?q=:pattern
Search for all tweets from a user that include `:pattern`. See /`:username`/tweets.
# Follows
Connect people, see who follows whom, etc.
GET /:username/followers
See who follows this user. Returns:
```js
{
"followers": [
"horse_ebooks",
"reyner",
"renyer"
]
}
```
GET /:username/following
See who this user is following. Returns:
```js
{
"following": [
"horse_ebooks",
"reyner",
"renyer"
]
}
```
POST /:username/follow
Make someone follow another person. Submit a payload:
```js
{
"username": "horse_ebooks"
}
```
# Users
List all users.
GET /users
See what users exist. Returns:
```js
{
"usernames": [
"horse_ebooks",
"timmy"
]
}
```