]> git.somenet.org - pub/jan/aic18.git/blob - service-twitter/README.md
Add curl example to Twitter README
[pub/jan/aic18.git] / service-twitter / README.md
1 # Twitter Service
2
3
4
5 ## API
6
7 You can use the search under [http://localhost:8084/search/tweets.json?q=Google](http://localhost:8080/search/tweets.json?q=Google)
8 where `q` is your search string.
9
10 It mainly mirrors the search API from Twitter. My implementation contains some basic fields with the same names as in
11 the official API. If you need more, please let me know.
12
13
14 ### Example
15
16 `curl -vs http://localhost:8084/search/tweets.json?q=Google `
17
18 Pipe it into e.g. `jq` for a more readable output.
19
20
21
22 ## API Keys
23
24 Unfortunately you have to provide your own API Keys, as sharing them is forbidden. In the worst case there would be five
25 people using the same keys at the same time. This probably asks for a ban.
26
27 I really don't want to risk it, as my application for a [Twitter Developer Platform](https://developer.twitter.com/)
28 account was ridiculously complicated. You have to answer four questions, with at least 400 (?) words, and as detailed as
29 possible. My application apparently wasn't detailed enough, so they asked me follow up questions. After two emails, one
30 with ~1.200 words, they were finally satisfied.
31
32 Furthermore people with an existing account, like I had, can't create new apps anymore, unless they apply again.
33
34 So I would advise you to [apply for an account](https://developer.twitter.com/en/apply-for-access) yourself, or maybe
35 ask someone else from the group if they have a spare key.
36
37 The keys then go into `application.yml` below `oauth:`, i.e. `consumer-key`, `consumer-secret`, `access-token`,
38 `access-token-secret`.