Skip to content

Commit 75f5804

Browse files
committed
Initial commit
0 parents  commit 75f5804

File tree

8 files changed

+996
-0
lines changed

8 files changed

+996
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

Dockerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM node:8.11.1-alpine
2+
3+
RUN mkdir -p /usr/src/app
4+
WORKDIR /usr/src/app
5+
6+
ENV NODE_ENV production
7+
8+
COPY package.json /usr/src/app
9+
COPY package-lock.json /usr/src/app
10+
COPY server/ /usr/src/app/server/
11+
RUN npm install
12+
13+
EXPOSE 8888
14+
15+
CMD node ./server/index.js

README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# buffer-code-exercise-api
2+
3+
This is a small api server which will be used in the Buffer interview
4+
code exercise.
5+
6+
## Endpoints
7+
8+
### `/getTweets`
9+
10+
Parameters
11+
12+
- `ids` - a comma-delineated list of tweet ids
13+
14+
Example request
15+
```
16+
https://code-exercise-api.buffer.com/getTweets?ids=989720051677741057,989479247084388353
17+
```
18+
19+
Example response
20+
```json
21+
[
22+
{
23+
"id": "989720051677741057",
24+
"screen_name": "buffer",
25+
"text": "Here Are The Science-Backed Reasons You Shouldn't Share Your Goals 👉 via @trello https://buff.ly/2F7Lor1",
26+
"retweet_count": 20,
27+
"favorite_count": 38,
28+
"click_count": 169
29+
},
30+
{
31+
"id": "989479247084388353",
32+
"screen_name": "buffer",
33+
"text": "It takes less than 2/10 of a second for someone to form a first opinion of your brand based on your website or social media profile.\n\nWe're chatting personal branding this week and why it's the most important asset you own! #BufferPodcast\n\n✨ https://buffer.com/podcast",
34+
"retweet_count": 21,
35+
"favorite_count": 54,
36+
"click_count": 20
37+
}
38+
]
39+
```
40+
41+
## License
42+
43+
MIT

0 commit comments

Comments
 (0)