{"id":19541783,"url":"https://github.com/nullscreen/social-network","last_synced_at":"2025-04-26T17:30:57.687Z","repository":{"id":21846928,"uuid":"25170141","full_name":"nullscreen/social-network","owner":"nullscreen","description":"An API Client for social networks","archived":false,"fork":false,"pushed_at":"2022-10-30T20:46:28.000Z","size":69,"stargazers_count":8,"open_issues_count":1,"forks_count":1,"subscribers_count":48,"default_branch":"main","last_synced_at":"2025-04-21T23:24:11.336Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nullscreen.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-10-13T17:46:04.000Z","updated_at":"2022-10-30T21:10:19.000Z","dependencies_parsed_at":"2023-01-13T21:42:32.453Z","dependency_job_id":null,"html_url":"https://github.com/nullscreen/social-network","commit_stats":null,"previous_names":["fullscreen/net"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nullscreen%2Fsocial-network","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nullscreen%2Fsocial-network/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nullscreen%2Fsocial-network/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nullscreen%2Fsocial-network/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nullscreen","download_url":"https://codeload.github.com/nullscreen/social-network/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251025625,"owners_count":21524836,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T03:11:56.495Z","updated_at":"2025-04-26T17:30:57.425Z","avatar_url":"https://github.com/nullscreen.png","language":"Ruby","readme":"Net - a Ruby client for social networks API\n===========================================\n\nNet helps you write apps that need to interact with Twitter, Instagram and Facebook.\n\n\nAfter [configuring your Twitter app](#configuring-your-twitter-app), you can run commands like:\n\n```ruby\nuser = Net::Twitter::User.find_by screen_name: 'fullscreen'\nuser.screen_name #=\u003e \"Fullscreen\"\nuser.follower_count #=\u003e 48_200\n```\nAfter [configuring your Instagram app](#configuring-your-instagram-app), you can run commands like:\n\n```ruby\nuser = Net::Instagram::User.find_by username: 'fullscreen_inc'\nuser.username #=\u003e \"fullscreen_inc\"\nuser.follower_count #=\u003e 7025\n```\n\nAfter [configuring your Facebook app](#configuring-your-facebook-app), you can run commands like:\n\n```ruby\npage = Net::Facebook::Page.find_by username: 'fullscreeninc'\npage.username #=\u003e \"fullscreeninc\"\npage.likes #=\u003e 30094\n```\n\nHow to install\n==============\n\nTo install on your system, run\n\n    gem install net\n\nTo use inside a bundled Ruby project, add this line to the Gemfile:\n\n    gem 'net', '~\u003e 0.2.1'\n\nSince the gem follows [Semantic Versioning](http://semver.org),\nindicating the full version in your Gemfile (~\u003e *major*.*minor*.*patch*)\nguarantees that your project won’t occur in any error when you `bundle update`\nand a new version of Net is released.\n\nAvailable resources\n===================\n\nNet::Twitter::User\n------------------\n\nUse [Net::Twitter::User]() to:\n\n* retrieve a Twitter user by screen name\n* retrieve a list of Twitter users by screen names\n* access the number of followers of a Twitter user\n\n```ruby\nuser = Net::Twitter::User.find_by screen_name: 'fullscreen'\nuser.follower_count #=\u003e 48_200\n\nusers = Net::Twitter::User.where screen_name: ['fullscreen', 'brohemian6']\nusers.map(\u0026:follower_count).sort #=\u003e [12, 48_200]\n```\n\n*The methods above require a configured Twitter app (see below).*\n\nNet::Instagram::User\n--------------------\n\nUse [Net::Instagram::User]() to:\n\n* retrieve an Instagram user by username\n* retrieve an Instagram user by id\n* access the number of followers of an Instagram user\n\n```ruby\nuser = Net::Instagram::User.find_by username: 'fullscreen'\nuser.follower_count #=\u003e 24198\n\nuser = Net::Instagram::User.find_by id: 270587948\nuser.follower_count #=\u003e 24198\n```\n\n*The methods above require a configured Instagram app (see below).*\n\nNet::Facebook::Page\n--------------------\n\nUse [Net::Facebook::Page]() to:\n\n* retrieve a Facebook page by username\n* access the number of likes of a Facebook user\n\n```ruby\npage = Net::Facebook::Page.find_by username: 'fullscreeninc'\npage.likes #=\u003e 7025\n```\n\nNet::Facebook::User\n--------------------\n\nUse [Net::Facebook::User]() to:\n\n* retrieve a Facebook user by username\n\n```ruby\nuser = Net::Facebook::User.find_by username: '10100829454613149'\nuser.first_name #=\u003e Jeremy\n```\n\n* Include a Facebook access_token parameter in order to access pages information for a certain user\n\n```ruby\nuser = Net::Facebook::User.find_by username: '10100829454613149', access_token: 'abc123'\nuser.pages #=\u003e [{\"name\"=\u003e\"Jeremy Video Game\", \"id\"=\u003e\"1627249647512991\"}, {\"name\"=\u003e\"Influencer Plus\", \"id\"=\u003e\"629655227132365\"}]\n```\n\n*The methods above require a configured Facebook app (see below).*\n\nConfiguring your Twitter app\n============================\n\nIn order to use Net you must create an app in the [Twitter Application Manager](https://apps.twitter.com/app/new).\n\nOnce the app is created, copy the API key and secret and add them to your\ncode with the following snippet of code (replacing with your own key and secret)\n:\n\n```ruby\nNet::Twitter.configure do |config|\n  config.apps.push key: 'abcd', secret: 'efgh'\nend\n```\n\nConfiguring with environment variables\n--------------------------------------\n\nAs an alternative to the approach above, you can configure your app with\nvariables. Setting the following environment variables:\n\n```bash\nexport TWITTER_API_KEY='abcd'\nexport TWITTER_API_SECRET='efgh'\n```\n\nis equivalent to configuring your app with the initializer:\n\n```ruby\nNet::Twitter.configure do |config|\n  config.apps.push key: 'abcd', secret: 'efgh'\nend\n```\n\nso use the approach that you prefer.\nIf a variable is set in both places, then `Net::Twitter.configure` takes precedence.\n\nConfiguring your Instagram app\n============================\n\nIn order to use Net you must create an app in the\n[Instagram Client Manager](http://instagram.com/developer/clients/register).\n\nOnce the app is created, copy the Client ID and add it to your\ncode with the following snippet of code (replacing with your own client id)\n:\n\n```ruby\nNet::Instagram.configure do |config|\n  config.client_id = 'abcdefg'\nend\n```\n\nConfiguring with environment variables\n--------------------------------------\n\nAs an alternative to the approach above, you can configure your app with\na variable. Setting the following environment variable:\n\n```bash\nexport INSTAGRAM_CLIENT_ID='abcdefg'\n```\n\nis equivalent to configuring your app with the initializer:\n\n```ruby\nNet::Instagram.configure do |config|\n  config.client_id = 'abcdefg'\nend\n```\n\nso use the approach that you prefer.\nIf a variable is set in both places, then `Net::Instagram.configure` takes precedence.\n\nConfiguring your Facebook app\n============================\n\nIn order to use Net you must create an app in the [Facebook Application Manager](https://developers.facebook.com/apps/).\n\nOnce the app is created, copy the API key and secret and add them to your\ncode with the following snippet of code (replacing with your own key and secret)\n:\n\n```ruby\nNet::Facebook.configure do |config|\n  config.client_id = 'abcdefg'\n  config.client_secret = 'abcdefg'\nend\n```\n\nConfiguring with environment variables\n--------------------------------------\n\nAs an alternative to the approach above, you can configure your app with\nvariables. Setting the following environment variables:\n\n```bash\nexport FACEBOOK_CLIENT_ID='abcd'\nexport FACEBOOK_CLIENT_SECRET='efgh'\n```\n\nis equivalent to configuring your app with the initializer:\n\n```ruby\nNet::Facebook.configure do |config|\n  config.client_id = 'abcd'\n  config.client_secret = 'efgh'\nend\n```\n\nso use the approach that you prefer.\nIf a variable is set in both places, then `Net::Facebook.configure` takes precedence.\n\nHow to test\n===========\n\nTo run tests, type:\n\n```bash\nrspec\n```\n\nNet uses [VCR](https://github.com/vcr/vcr) so by default tests do not run\nHTTP requests.\n\nIf you need to run tests against the live Twitter API or Instagram API,\nconfigure your [Twitter app](#configuring-your-twitter-app) or your [Instagram app](#configuring-your-instagram-app)  using environment variables,\nerase the cassettes, then run `rspec`.\n\n\nHow to release new versions\n===========================\n\nIf you are a manager of this project, remember to upgrade the [Net gem](http://rubygems.org/gems/net)\nwhenever a new feature is added or a bug gets fixed.\n\nMake sure all the tests are passing, document the changes in CHANGELOG.md and\nREADME.md, bump the version, then run\n\n    rake release\n\nRemember that the net gem follows [Semantic Versioning](http://semver.org).\nAny new release that is fully backward-compatible should bump the *patch* version (0.1.x).\nAny new version that breaks compatibility should bump the *minor* version (0.x.0)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnullscreen%2Fsocial-network","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnullscreen%2Fsocial-network","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnullscreen%2Fsocial-network/lists"}