🚀 DAY 2 OF LAUNCH WEEK: Announcing Socket Certified Patches: One-Click Fixes for Vulnerable Dependencies.Learn more →
Socket
Book a DemoInstallSign in
Socket

gopkg.in/nowk/go-instagram.v0

Package Overview
Dependencies
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gopkg.in/nowk/go-instagram.v0

Go
Version
v0.0.3
Version published
Created
Source

go-instagram

Build Status GoDoc

Instagram client in Go

Install

go get gopkg.in/nowk/go-instagram.v0

Usage

import "log"
import "gopkg.in/nowk/go-instagram.v0"

func main() {
  api := instagram.NewClient(<...access_token...>)

  data, err := api.Users.SelfFeed()
  if err != nil {
    log.Fatalf("fatal: %s", err)
  }

  if data.Meta.code != 200 {
    log.Fatalf("error: %s: %s", data.Meta.ErrorType, data.Meta.ErrorMessage)
  }

  for _, media := range data.Data {
    log.Print(media.User.FullName)
  }
}

API

Return a new client

api := instagram.NewClient(<...access_token...>)
Endpoints

Endpoints are organized and mapped based on the documentation http://instagram.com/developer/endpoints/

api.Users         // => Users Endpoints
api.Relationships // => Relationships Endpoints
api.Media         // => Media Endpoints
api.Comments      // => Comments Endpoints
api.Likes         // => Likes Endpoints
api.Tags          // => Tags Endpoints
api.Locations     // => Locations Endpoints
api.Geographies   // => Geographies Endpoints

go-instagram comes with an included jsons package which contains all the structures for the returned JSON payloads. This package is available to allow you to create your own go channels.

Enforce Signed Header
api.SetSignedHeader("secret", "192.168.0.1", "192.168.0.2")

License

MIT

FAQs

Package last updated on 31 Aug 2014

Did you know?

Socket

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.

Install

Related posts