8000 GitHub - Tameyer41/bundl_instagram_api
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Tameyer41/bundl_instagram_api

Bundl Instagram API

A gem for Instagram Graph API using koala.

Installation

Add this line to your application's Gemfile:

gem 'bundl_instagram_api'

And then execute:

$ bundle

Or install it yourself as:

$ gem install bundl_instagram_api

Usage

client = BundlInstagramApi.client(ACCESS_TOKEN)

#get an arraay of business accounts linked to the access_token
client.ig_business_accounts
#get an array of connected IG accounts linked to the access_token
client.connected_ig_accounts

#to get specific fields from "id,name,biography,ig_id,followers_count,profile_picture_url,username"
client.ig_business_accounts("name,followers_count")
client.connected_ig_accounts("name,followers_count")

#get IG business account/ Connected IG account info
client.get_account_info(IG_BUSINESS_ID)
#to get specific fields
fields = "name, biography"
client.get_account_info(IG_BUSINESS_ID, fields)

#get media list
client.get_user_recent_media(IG_BUSINESS_ID)

#get media details
client.get_media_details(MEDIA_ID)
#to get specific fields
fields  = "media_url, permalink"
client.get_media_details(MEDIA_ID, fields)

#Discover business user
client.discover_user(USERNAME)
# fields can be from "id,followers_count,media_count,ig_id"
fields = "followers_count,media_count,ig_id"
client.discover_user(USERNAME, fields)

#discover user media, fields can be "caption,media_url,media_type,like_count,comments_count,id"
client.discover_user_media(USERNAME, fields)

#Search for a tag, 
client.tag_media(page_token, tag_name)
#fields can be "media_type,comments_count,like_count,media_url,permalink"
fields="media_url,permalink"
client.tag_media(page_token, tag_name, fields)
#custom edge can be provided, default is 'top_media'
tag_media = client.tag_media(page_token, tag_name, edge: "recent_media")
# Note: We can run `tag_media.next_page` to fetch next set of results
# additional arguent options can also be passed for page params i.e before/after/limit etc

Development

After chec 7393 king out the repo, run bin/setup to install dependencies. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

This is a fork of https://github.com/rakeshpatra/instagram_graph_api. All contributions should be directed at Rakeshpatra's page.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the InstagramGraphApi project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

About

No description, website, or topics provided.

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.txt

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0