Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/neuegram/ghost
A Go library for Snapchat's API
https://github.com/neuegram/ghost
Last synced: about 17 hours ago
JSON representation
A Go library for Snapchat's API
- Host: GitHub
- URL: https://github.com/neuegram/ghost
- Owner: neuegram
- License: mit
- Created: 2015-02-08T02:02:04.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-12-24T02:36:22.000Z (over 8 years ago)
- Last Synced: 2024-06-19T05:40:55.873Z (1 day ago)
- Language: Go
- Size: 38.1 KB
- Stars: 22
- Watchers: 7
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- fucking-awesome-go - :octocat: ghost - Go Library for accessing the Snapchat API. :star: 16 :fork_and_knife: 1 (Third-party APIs / Advanced Console UIs)
- awesome-go - ghost - Go Library for accessing the Snapchat API. (Third-party APIs / Advanced Console UIs)
- awesome-go - ghost - Go Library for accessing the Snapchat API. (<span id="第三方api-third-party-apis">第三方API Third-party APIs</span> / <span id="高级控制台用户界面-advanced-console-uis">高级控制台用户界面 Advanced Console UIs</span>)
- awesome-go-cn - ghost - 用于和 Snapchat API 交互的库 (第三方 APIs / 高级控制台界面)
- awesome-go - ghost - Go Library for accessing the Snapchat API. (Third-party APIs / Advanced Console UIs)
- awesome-go - ghost - 用於和 Snapchat API 交互的庫 (第三方 APIs / 高級控制台界面)
- awesome-go - ghost - Go Library for accessing the Snapchat API. (Third-party APIs / Advanced Console UIs)
README
# ghost
A Go library for Snapchat's API#### Installation
`$ go get github.com/neuegram/ghost`This library has been updated to keep up with Snapchat's changes. To use this library you need to signup to use the Casper API.
[Register a casper account](https://clients.casper.io/register.php), and you can start using this library.
### Warning
**This library is in alpha** at the moment, not everything has been tested (yet) but the basics still work. Feel free to contribute, this library is actively maintained and is making fast progress! :)
**Use at your own risk.**
### Examples
### Fetch all updates
```go
package mainimport (
"fmt"
"github.com/neuegram/ghost"
)func main() {
casperClient := ghost.NewRawCasperClient("yourapikey","yourapisecret")
casperClient.Username = "yoursnapchatusername"
casperClient.Password = "yoursnapchatpassword"
casperClient.Debug = false
snapchat := ghost.NewAccount("[email protected]", "yourgmailpassword", casperClient, false)
err := snapchat.Login()
if err != nil {
fmt.Println(err)
}
fmt.Println(snapchat.Updates())
}```
### Sending a Snap
```go
package mainimport (
"fmt"
"github.com/neuegram/ghost"
)func main() {
casperClient := ghost.NewRawCasperClient("yourapikey","yourapisecret")
casperClient.Username = "yoursnapchatusername"
casperClient.Password = "yoursnapchatpassword"
casperClient.Debug = false
snapchat := ghost.NewAccount("[email protected]", "yourgmailpassword", casperClient, false)
err := snapchat.Login()
mediaID, err := snapchat.Upload("yoursnap.jpg")
result, err := snapchat.Send(mediaID, []string{"teamsnapchat"}, 10)
if err != nil {
fmt.Println(err)
}
fmt.Println(result)
}
```#### Snapchat Registration CLI
You can register a Snapchat account through the CLI.Run `$ go get github.com/neuegram/ghost/srcli`
Run `$ srcli -help` for more details.
### Special Thanks
- [mgp25](https://github.com/mgp25)
- [neuegram](https://github.com/neuegram)
- [teknogeek](https://github.com/teknogeek)
- [hako](https://github.com/hako)
- [liamcottle](https://github.com/liamcottle) (creator of [Casper](https://casper.io/))
- [kyleboyer](https://github.com/kyleboyer)If you would like to contribute, you can take a look at the documentation [here](https://github.com/mgp25/SC-API/wiki/API-v2-Research) and [here](https://github.com/cuonic/SnapchatDevWiki/wiki).
### Extra Special Thanks :poop:
To whoever at Snapchat came up with this header:
> “X-Snapchat-Notice: Snapchat Private APIs - Unauthorized use is prohibited.”And to whoever at Snapchat came up with this message:
> We've noticed that you're using a third-party application to access Snapchat, putting yourself (and possibly your friends) at risk. Please change your password and stop using third-party applications when you access Snapchat.### License
This project is licensed under the MIT license, see the LICENSE file for more details.