0.02
No commit activity in last 3 years
No release in over 3 years
A RubyMotion Twitter Wrapper
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

>= 1.1.2
 Project Readme

TwitterMotion, a RubyMotion Wrapper

Usage

See Availability:

if Twitter::Composer.available?
  # Add tweet button etc
end

Sign in:

Twitter.sign_in do |granted, ns_error|
  # have fun
end

See accounts:

> Twitter.accounts
=> [#<Twitter::User>]
> Twitter.accounts[0].username
=> "clayallsopp"

Compose a tweet:

Twitter.accounts[0].compose(tweet: 'Hello RubyMotion!',
  images: [ui_image], urls: ["http://clayallsopp.com"]) do |composer|
  if composer.error
    # check error.invalid_tweet/images/urls
  elsif composer.cancelled?
    # user didnt sent the tweet
  elsif composer.done?
    # user sent the tweet
  end
end

or without a user:

composer = Twitter::Composer.new
composer.compose(tweet: 'Hello RubyMotion!',
  images: [ui_image], urls: ["http://clayallsopp.com"]) do |composer|
  ...
end

Grab a user's timeline:

user.get_timeline do |hash, ns_error|
  p "Timeline #{hash}"
  # => [{\"coordinates\"=>nil, \"truncated\"=>false.....}, ....]
end

Installation

  1. gem install twittermotion

  2. Add require 'twittermotion' to your Rakefile

Pull Requests

It would be really cool if this was a fully-compatible Twitter API wrapper, so add whatever functionality you think helps!