Sha256: e12f367c6f5da9dc7fbfd48f9f6ccc07c73e28db6c7f4ae3d18d4ce0f4f11806

Contents?: true

Size: 1.16 KB

Versions: 1

Compression:

Stored size: 1.16 KB

Contents

# TwitterMotion, a RubyMotion Wrapper

## Usage

Sign in:

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

See accounts:

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

Compose a tweet:

```ruby
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:

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

Grab a user's timeline:

```ruby
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!

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
twittermotion-0.0.1 README.md