Skip to content

twitter-compatible API #562

Closed
carols10cents opened this Issue Aug 16, 2012 · 11 comments

4 participants

@carols10cents

Clients like TTYtter allow you to change the endpoint the client is pointing to, so that if we support the same things as twitter, those clients should Just Work.

See http://www.floodgap.com/software/ttytter/#laconica

@carols10cents

I thought we had an issue for this before, but I guess not.

This can definitely be broken down into subtasks for multiple people to work on -- if you'd like to work on a piece of this (for example, /statuses/user_timeline.json), create a new issue and reference it here!

@jrgifford

#14 seems related, but since it's closed, well, this is now the master issue.

@carols10cents

Good catch, @jrgifford.

@carols10cents

Ok so looking at the TTYtter code here: http://www.floodgap.com/software/ttytter/dist2/2.0.02.txt

Here are the twitter URLs that TTYtter is looking for that we should offer:

$oauthbase ||= $apibase || "${http_proto}://api.twitter.com";
$apibase ||= "${http_proto}://api.twitter.com/1";

$url ||= "${apibase}/statuses/home_timeline.json";

$oauthurl ||= "${oauthbase}/oauth/request_token";
$oauthauthurl ||= "${oauthbase}/oauth/authorize";
$oauthaccurl ||= "${oauthbase}/oauth/access_token";

$credurl ||= "${apibase}/account/verify_credentials.json";
$update ||= "${apibase}/statuses/update.json";
$rurl ||= "${apibase}/statuses/mentions.json";
$uurl ||= "${apibase}/statuses/user_timeline.json";
$idurl ||= "${apibase}/statuses/show";
$delurl ||= "${apibase}/statuses/destroy";

$rturl ||= "${apibase}/statuses/retweet";
$rtsbyurl ||= "${apibase}/statuses/%I/retweeted_by.json";
$rtsofmeurl ||= "${apibase}/statuses/retweets_of_me.json";

$wurl ||= "${apibase}/users/show.json";

$frurl ||= "${apibase}/friendships/exists.json";
$followurl ||= "${apibase}/friendships/create";
$leaveurl ||= "${apibase}/friendships/destroy";
$blockurl ||= "${apibase}/blocks/create.json";
$blockdelurl ||= "${apibase}/blocks/destroy.json";
$friendsurl ||= "${apibase}/statuses/friends.json";
$followersurl ||= "${apibase}/statuses/followers.json";

$rlurl ||= "${apibase}/account/rate_limit_status.json";

$dmurl ||= "${apibase}/direct_messages.json";
$dmsenturl ||= "${apibase}/direct_messages/sent.json";
$dmupdate ||= "${apibase}/direct_messages/new.json";
$dmdelurl ||= "${apibase}/direct_messages/destroy";
$dmidurl ||= "${apibase}/direct_messages/show";

$favsurl ||= "${apibase}/favorites";
$myfavsurl ||= "${apibase}/favorites.json";
$favurl ||= "${apibase}/favorites/create";
$favdelurl ||= "${apibase}/favorites/destroy";

$getlisurl ||= "${apibase}/lists.json";
$creliurl ||= "${apibase}/lists/create.json";
$delliurl ||= "${apibase}/lists/destroy.json";
$modifyliurl ||= "${apibase}/lists/update.json";
$deluliurl ||= "${apibase}/lists/members/destroy_all.json";
$adduliurl ||= "${apibase}/lists/members/create_all.json";
$getuliurl ||= "${apibase}/lists/memberships.json";
$getufliurl ||= "${apibase}/lists/subscriptions.json";
$delfliurl ||= "${apibase}/lists/subscribers/destroy.json";
$crefliurl ||= "${apibase}/lists/subscribers/create.json";
$getfliurl ||= "${apibase}/lists/subscribers.json";
$getliurl ||= "${apibase}/lists/members.json";
$statusliurl ||= "${apibase}/lists/statuses.json";


$queryurl ||= "http://search.twitter.com/search.json";
@carols10cents

Some of those are higher priority than others -- rstat.us doesnt have the concept of lists, so we can scratch those, for example.

I'm working on making rstat.us an oauth provider in issue #564, but we could work on these URLs in parallel.

If you'd like to work on one or a set of these, make a comment to claim!

@jrgifford
@steveklabnik
  1. I think Salmon got finished, but we never built the stuff to finish doing DMs.
  2. Yes
  3. no.
@carols10cents

Starting to break these out into individual issues. Did #570 and #571 and I'm hungry, so I'll keep doing this after I eat ;)

@carols10cents

Wheeee! closing this issue in favor of all the little issues we have now.

@thomaslee thomaslee added a commit to thomaslee/rstat.us that referenced this issue Aug 20, 2012
@thomaslee thomaslee Implement GET /statuses/user_timeline.json.
Almost identical to GET /statuses/home_timeline.json (see #570), but
the user is explicitly specified by the caller.

Added a bit of error handling guff relating to users that can't be found
and/or when the caller provides us with questionable input.

[#562]
634638a
@thomaslee

Oops. That commit was supposed to be against #573.

@DiogoAndre DiogoAndre added a commit to DiogoAndre/rstat.us that referenced this issue Sep 28, 2012
@thomaslee thomaslee Implement GET /statuses/user_timeline.json.
Almost identical to GET /statuses/home_timeline.json (see #570), but
the user is explicitly specified by the caller.

Added a bit of error handling guff relating to users that can't be found
and/or when the caller provides us with questionable input.

[#562]
f54940e
@thomaslee thomaslee added a commit that referenced this issue Sep 28, 2012
@thomaslee thomaslee Implement GET /statuses/user_timeline.json.
Almost identical to GET /statuses/home_timeline.json (see #570), but
the user is explicitly specified by the caller.

Added a bit of error handling guff relating to users that can't be found
and/or when the caller provides us with questionable input.

[#562]
4b99b98
@Nakort Nakort added a commit to Nakort/rstat.us that referenced this issue Oct 12, 2012
@thomaslee thomaslee Implement GET /statuses/user_timeline.json.
Almost identical to GET /statuses/home_timeline.json (see #570), but
the user is explicitly specified by the caller.

Added a bit of error handling guff relating to users that can't be found
and/or when the caller provides us with questionable input.

[#562]
c53e1f5
@thomaslee thomaslee added a commit that referenced this issue Oct 13, 2012
@thomaslee thomaslee Implement GET /statuses/user_timeline.json.
Almost identical to GET /statuses/home_timeline.json (see #570), but
the user is explicitly specified by the caller.

Added a bit of error handling guff relating to users that can't be found
and/or when the caller provides us with questionable input.

[#562]
4b00079
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.