Integrate with your sites¶
Douban¶
Short Introduction about Douban¶
Douban (Chinese: 豆瓣; pinyin: Dòubàn), launched on March 6, 2005, is a Chinese SNS website allowing registered users to record information and create content related to film, books, music, and recent events and activities in Chinese cities. [1]
Integrate Guide¶
Let’s assume that your api site is “http://api.foo.com”, you host douban on “/douban” path.
Go to the Douban Apps page and create a new app. Make sure that the callback uri equals to “http://api.foo.com/douban/login/redirict” (site + path + ‘/login/redirect’).
Go to the app you just created, take down the API Key and Secret.
Go ‘test user’ page in you app, add your douban account as a test user.
Back to me-api, add the douban middleware to your config file:
$ python generate add
then choose douban and input the data.
- Go to “http://api.foo.com/douban/login”, authorize your app to get the access_token.
- Take down the access_token and fill it in our config file.
- Restart the server, go to “http://api.foo.com/douban” and have a check.
Github¶
Short Introduction about Github¶
GitHub is a web-based Git repository hosting service, which offers all of the distributed revision control and source code management (SCM) functionality of Git as well as adding its own features.As of 2015, GitHub reports having over 9 million users and over 21.1 million repositories, making it the largest code hoster in the world. [2]
Integrate Guide¶
Let’s assume that your api site is “http://api.foo.com”, you host github on “/code” path.
Add github middleware to your config file:
$ python generate add
then choose github and follow the prompt.
- That’s all! Restart the server, go to “http://api.foo.com/code” and have a check.
Instagram¶
Short Introduction about Instagram¶
Instagram is an online mobile photo-sharing, video-sharing and social networking service that enables its users to take pictures and videos, and share them on a variety of social networking platforms, such as Facebook, Twitter, Tumblr and Flickr. [3]
Integrate Guide¶
Let’s assume that your api site is “http://api.foo.com”, you host instagram on “/instagram” path.
Go to the Instagram Clients page and create a new client. Make sure that the Redirect URI equals to “http://api.foo.com/instagram/login/redirict” (site + path + ‘/login/redirect’).
Go to the app you just created, take down the Client ID and Client Secret.
Back to me-api, add the instagram middleware to your config file:
$ python generate add
then choose instagram and input the data.
- Go to “http://api.foo.com/instagram/login”, authorize your app to get the access_token.
- Take down the access_token and fill it in our config file.
- Restart the server, go to “http://api.foo.com/instagram” and have a check.
Keybase¶
Short Introduction about Keybase¶
Well, Keybase is a website, but it’s also an open source command line program. Let’s walk through a terminal example, which illustrates what Keybase does. All of this can be embedded into other software, written by anyone. [4]
Integrate Guide¶
Let’s assume that your api site is “http://api.foo.com”, you host keybase on “/keybase” path.
Add keybase middleware to your config file:
$ python generate add
then choose keybase and follow the prompt.
- That’s all! Restart the server, go to “http://api.foo.com/keybase” and have a check.
Medium¶
Short Introduction about Medium¶
Medium is a blog-publishing platform. The platform has evolved into a hybrid of non-professional contributions and professional, paid contributions, an example of social journalism. [5]
Integrate Guide¶
WARNING
UPDATED on 2016-02-20: the way to fetch the lastest posts can’t work any more, please help. Related discussions are at issue #8.
Let’s assume that your api site is “http://api.foo.com”, you host medium on “/medium” path.
Add medium middleware to your config file:
$ python generate add
then choose medium and follow the prompt.
- That’s all! Restart the server, go to “http://api.foo.com/medium” and have a check.
Stack Overflow¶
Short Introduction about Stack Overflow¶
Stack Overflow serves as a platform for users to ask and answer questions, and, through membership and active participation, to vote questions and answers up or down and edit questions and answers. The website features questions and answers on a wide range of topics in computer programming. [6]
Integrate Guide¶
Let’s assume that your api site is “http://api.foo.com”, you host stack overflow on “/stackoverflow” path.
Go to the Stack Overflow Apps page and create a new app. Make sure that the OAuth Domain covers “http://api.foo.com/stackoverflow/login/redirict” (site + path + ‘/login/redirect’). In this example, you can set it as “api.foo.com”.
Go to the app you just created, take down the Client Id, Client Secret and Key.
Back to me-api, add the stack overflow middleware to your config file:
$ python generate add
then choose stackoverflow and input the data.
- Go to “http://api.foo.com/stackoverflow/login”, authorize your app to get the access_token.
- Take down the access_token and fill it in our config file.
- Restart the server, go to “http://api.foo.com/stackoverflow” and have a check.
Twitter¶
Short Introduction about Twitter¶
Twitter (/ˈtwɪtər/) is an online social networking service that enables users to send and read short messages called “tweets”. [7]
Integrate Guide¶
Let’s assume that your api site is “http://api.foo.com”, you host twitter on “/twitter” path.
Go to the Twitter Apps page and create a new app.
Go to the app you just created, click the ‘Keys and Access Tokens’ tab, take down the Consumer Key (API Key), Consumer Secret (API Secret), Access Token and Access Token Secret.
Back to me-api, add the twitter middleware to your config file:
$ python generate add
then choose twitter and input the data.
- Restart the server, go to “http://api.foo.com/twitter” and have a check.
[1] | https://en.wikipedia.org/wiki/Douban |
[2] | https://en.wikipedia.org/wiki/GitHub |
[3] | https://en.wikipedia.org/wiki/Instagram |
[4] | https://keybase.io/ |
[5] | https://en.wikipedia.org/wiki/Medium_%28service%29 |
[6] | https://en.wikipedia.org/wiki/Stack_Overflow |
[7] | https://en.wikipedia.org/wiki/Twitter |