Page Menu
Home
Musing Studio
Search
Configure Global Search
Log In
Files
F10384468
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
View Options
diff --git a/README.md b/README.md
index dc35ec8..32e6292 100644
--- a/README.md
+++ b/README.md
@@ -1,54 +1,54 @@
# go-snapas
-[![godoc](https://godoc.org/github.com/snapas/go-snapas?status.svg)](https://godoc.org/github.com/snapas/go-snapas)
+[![Go Reference](https://pkg.go.dev/badge/github.com/snapas/go-snapas.svg)](https://pkg.go.dev/github.com/snapas/go-snapas)
Official Snap.as Go client library.
## Installation
```bash
go get github.com/snapas/go-snapas
```
## Documentation
See all functionality and usages in the [API documentation](https://developers.snap.as/docs/api/).
### Example usage
```go
import (
"github.com/snapas/go-snapas"
"github.com/writeas/go-writeas/v2"
"log"
)
func main() {
// Authenticate with Write.as
wc := writeas.NewClient()
u, err := wc.LogIn("demo", "demo")
if err != nil {
log.Fatal(err)
}
// Upload to Snap.as
sc := snapas.NewClient(u.AccessToken)
p, err := sc.UploadPhoto(&snapas.PhotoParams{
FileName: "image.jpg",
})
if err != nil {
wc.LogOut()
log.Fatal(err)
}
// Output final domain
log.Println(p.URL)
// Clean up
wc.LogOut()
}
```
## License
MIT
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sat, Nov 23, 4:32 PM (23 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3104652
Attached To
rSAGO go-snapas
Event Timeline
Log In to Comment