
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Add this line to your application's Gemfile:
gem 'twitter_api'
And then execute:
$ bundle
Or install it yourself as:
$ gem install twitter_api
require 'twitter_api'
require 'json'
# create a instance of API wrapper
t = TwitterAPI::Client.new({
:consumer_key => 'YOUR_CONSUMER_KEY',
:consumer_secret => 'YOUR_CONSUMER_SECRET',
:token => 'YOUR_ACCESS_TOKEN',
:token_secret => 'YOUR_ACCESS_SECRET'
})
# call GET statuses/user_timeline
res = t.get('https://api.twitter.com/1.1/statuses/user_timeline.json', {
'screen_name' => 'YOUR_SCREEN_NAME',
'count' => '1',
'tweet_mode' => 'extended'
})
puts res.headers
puts JSON.pretty_generate(JSON.parse(res.body))
# call GET statuses/user_timeline
res = t.statuses_user_timeline({
'screen_name' => 'YOUR_SCREEN_NAME',
'count' => '1',
'tweet_mode' => 'extended'
})
puts res.headers
puts JSON.pretty_generate(JSON.parse(res.body))
# call POST statuses/update
res = t.post('https://api.twitter.com/1.1/statuses/update.json', {
'status' => "hello, world #{Time.now.to_i}"
})
puts res.headers
puts JSON.pretty_generate(JSON.parse(res.body))
# call POST statuses/update
res = t.statuses_update({
'status' => "hello, world #{Time.now.to_i}"
})
puts res.headers
puts JSON.pretty_generate(JSON.parse(res.body))
$ rake -T
rake build # Build twitter_api-X.X.X.gem into the pkg directory
rake clean # Remove any temporary products
rake clobber # Remove any generated files
rake install # Build and install twitter_api-X.X.X.gem into system gems
rake install:local # Build and install twitter_api-X.X.X.gem into system gems without network access
rake release[remote] # Create tag vX.X.X and build and push twitter_api-X.X.X.gem to Rubygems
rake spec # Run RSpec code examples
Bug reports and pull requests are welcome on GitHub at https://github.com/niwasawa/twitter-api-ruby-thin-client-wrapper. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that twitter_api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.