Security News
Opengrep Emerges as Open Source Alternative Amid Semgrep Licensing Controversy
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
github.com/ljesparis/gostagram
Unofficial and easy to use instagram client for go.
Create Instagram Client
Go to instagram developer website and create a developer account, then register a new instagram client.
Implement Oauth2 Protocol
Get the access token, implementing oauth2 authorization protocol. I do recommmend oauth2 for this job. Here you can find an oauth2 example.
Download and Installation
go get github.com/ljesparis/gostagram
Usage
Basic example, using an client to consume an instagram endpoint.
package main
import (
"fmt"
"github.com/ljesparis/gostagram"
)
func main() {
client := gostagram.NewClient("access_token")
user, err := client.GetCurrentUser()
if err != nil {
fmt.Println(err)
} else {
fmt.Println(user.Id)
fmt.Println(user.Username)
fmt.Println(user.FullName)
}
}
If you want to enable instagram signed requests mode you have to tell gostagram client, that you want to sig a request.
package main
import (
"fmt"
"github.com/ljesparis/gostagram"
)
func main() {
client := gostagram.NewClient("access_token")
client.SetSignedRequest(true)
client.SetClientSecret("client secret")
tags, err := client.SearchTags("golang")
if err != nil {
fmt.Println(err)
} else {
for _, tag := range tags {
fmt.Println("Tag name: ", tag.Name)
}
}
}
Before executing gostagram tests, please get access token, client secret and complete every empty variable in all test file, why? well, that way you could test every method with your own parameters, otherwise multiples errors will be thrown.
Note: test every method one by one, use the makefile to optimize that process.
Please use Github issue tracker for everything.
gostagram license MIT
FAQs
Unknown package
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
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.