Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it work with Twitter API 1.1 #62

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

metaview
Copy link

I patched Spaz for webOS to make it compatible with Twitter's API 1.1. Please make an update in the AppCatalog. There are still Spaz users with webOS phones :)

@mephinet
Copy link

Hey, that was my task for tonight ;-)
Great, I just tested it on the HP Veer - everything works fine for me, except for the "favorites" tab, which still returns a generic error message.
Is spaz-enyo on your to-do list as well?

@metaview
Copy link
Author

Hi,

yes, I would at least try it today. (I'm in Europe, that means I'll start now :)
Do you wanna look at "favorites" in Spaz for phones?

Thx
Henk

mephinet schrieb:

Hey, that was my task for tonight ;-)
Great, I just tested it on the HP Veer - everything works fine for me, except for the "favorites"
tab, which still returns a generic error message.
Is spaz-enyo on your to-do list as well?


Reply to this email directly or view it on GitHub
#62 (comment).


Henk Jonas
Palm OS ® certified developer

[email protected] www.metaviewsoft.de

@mephinet
Copy link

Sure, I'll give it a try, today or tomorrow evening (CEST as well).

@metaview
Copy link
Author

BTW: you probably just need to alter the API urls. At least for Spaz HD it was sufficient for
favorites and follow and unfollow:

/*

  • given a key, it returns the URL (baseurl+API method path)

  • @param {string} key the key for the URL

  • @param {array|object} urldata data to included in the URL as GET data
    */
    SpazTwit.prototype.getAPIURL = function(key, urldata) {
    var urls = {};

    // Timeline URLs
    urls.public_timeline = "statuses/public_timeline.json";
    urls.friends_timeline = "statuses/friends_timeline.json";
    urls.home_timeline = "statuses/home_timeline.json";
    urls.user_timeline = "statuses/user_timeline.json";
    urls.replies_timeline = "statuses/mentions_timeline.json";
    urls.show = "statuses/show/{{ID}}.json";
    urls.show_related = "related_results/show/{{ID}}.json";
    urls.favorites = "favorites/list.json";
    urls.user_favorites = "favorites/{{ID}}.json"; // use this to retrieve favs of a user other
    than yourself
    urls.dm_timeline = "direct_messages.json";
    urls.dm_sent = "direct_messages/sent.json";
    urls.friendslist = "statuses/friends.json";
    urls.followerslist = "statuses/followers.json";
    urls.show_user = "users/show.json";
    urls.featuredlist = "statuses/featured.json";

    // Action URLs
    urls.update = "statuses/update.json";
    urls.destroy_status = "statuses/destroy/{{ID}}.json";
    urls.dm_new = "direct_messages/new.json";
    urls.dm_destroy = "direct_messages/destroy.json";
    urls.friendship_create = "friendships/create.json";
    urls.friendship_destroy = "friendships/destroy.json";
    urls.friendship_show = "friendships/show.json";
    urls.friendship_incoming = "friendships/incoming.json";
    urls.friendship_outgoing = "friendships/outgoing.json";
    urls.graph_friends = "friends/ids.json";
    urls.graph_followers = "followers/ids.json";
    urls.block_create = "blocks/create.json";
    urls.block_destroy = "blocks/destroy.json";
    urls.follow = "notifications/follow/{{ID}}.json";
    urls.unfollow = "notifications/leave/{{ID}}.json";
    urls.favorites_create = "favorites/create.json";
    urls.favorites_destroy = "favorites/destroy.json";
    urls.saved_searches_create = "saved_searches/create.json";
    urls.saved_searches_destroy = "saved_searches/destroy/{{ID}}.json";
    urls.verify_credentials = "account/verify_credentials.json";
    urls.ratelimit_status = "account/rate_limit_status.json";
    urls.update_profile = "account/update_profile.json";
    urls.saved_searches = "saved_searches/list.json";
    urls.report_spam = "report_spam.json";

    // User lists URLs
    urls.lists = "{{USER}}/lists.json";
    urls.lists_list = "{{USER}}/lists/{{SLUG}}.json";
    urls.lists_memberships = "{{USER}}/lists/memberships.json";
    urls.lists_timeline = "{{USER}}/lists/{{SLUG}}/statuses.json";
    urls.lists_members = "{{USER}}/{{SLUG}}/members.json";
    urls.lists_check_member = "{{USER}}/{{SLUG}}/members/{{ID}}.json";
    urls.lists_subscribers = "{{USER}}/{{SLUG}}/subscribers.json";
    urls.lists_check_subscriber = "{{USER}}/{{SLUG}}/subscribers/{{ID}}.json";
    urls.lists_subscriptions = "{{USER}}/lists/subscriptions.json";

    //trends
    urls.trends = "trends.json";
    urls.trends_current = "trends/current.json";
    urls.trends_daily = "trends/daily.json";
    urls.trends_weekly = "trends/weekly.json";

    //retweet
    urls.retweet = "statuses/retweet/{{ID}}.json";
    urls.retweets = "statuses/retweets/{{ID}}.json";
    urls.retweeted_by_me = "statuses/retweeted_by_me.json";
    urls.retweeted_to_me = "statuses/retweeted_to_me.json";
    urls.retweets_of_me = "statuses/retweets_of_me.json";

    urls.search = "search/tweets.json";

    // misc
    urls.test = "help/test.json";
    urls.downtime_schedule = "help/downtime_schedule.json";

mephinet schrieb:

Sure, I'll give it a try, today or tomorrow evening (CEST as well).


Reply to this email directly or view it on GitHub
#62 (comment).


Henk Jonas
Palm OS ® certified developer

[email protected] www.metaviewsoft.de

@mephinet
Copy link

That's true for the listing of the favourites - it's not sufficient for creating new ones - I'll look into that tomorrow - now out for drinks! B-)

@metaview
Copy link
Author

Ok, on SpazHD it was enough even for creating Favorites. Anyway, enjoy your drink :)

mephinet schrieb:

That's true for the listing of the favourites - it's not sufficient for creating new ones - I'll
look into that tomorrow - now out for drinks! B-)


Reply to this email directly or view it on GitHub
#62 (comment).


Henk Jonas
Palm OS ® certified developer

[email protected] www.metaviewsoft.de

@mephinet
Copy link

I'm afraid your changes to spazcore-webos.js won't be merged, as this file is generated from https://github.com/spazproject/spazcore - the changes need to go in there...

@mephinet
Copy link

I moved your changes into the source: https://github.com/mephinet/spazcore

@metaview
Copy link
Author

ok, just do it :)-- Sent from my HP PreOn 19.07.2013 22:14, mephinet [email protected] wrote: I moved your changes into the source: https://github.com/mephinet/spazcore

—Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants