https://github.com/Kardbord/imgflipgo
Unofficial (Golang) Go bindings for the Imgflip API
https://github.com/Kardbord/imgflipgo
api-bindings api-wrapper go golang imgflip imgflip-api meme memes
Last synced: 6 months ago
JSON representation
Unofficial (Golang) Go bindings for the Imgflip API
- Host: GitHub
- URL: https://github.com/Kardbord/imgflipgo
- Owner: Kardbord
- License: mit
- Created: 2021-10-29T19:16:38.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-07-02T04:19:53.000Z (12 months ago)
- Last Synced: 2024-12-10T05:09:58.974Z (6 months ago)
- Topics: api-bindings, api-wrapper, go, golang, imgflip, imgflip-api, meme, memes
- Language: Go
- Homepage:
- Size: 36.1 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# imgflipgo
[](https://github.com/Kardbord/imgflipgo/actions/workflows/unit-tests.yml)
[](https://github.com/Kardbord/imgflipgo/actions/workflows/codeql-analysis.yml)
[](https://goreportcard.com/report/github.com/Kardbord/imgflipgo)(Golang) Go bindings for the [Imgflip API](https://imgflip.com/api).
## Usage
To include this library in your Go project using modules, add the following import and run `go mod tidy`.
```Go
import "github.com/Kardbord/imgflipgo"
```Otherwise, you can run the following command.
```sh
go get github.com/Kardbord/imgflipgo
```The code is fairly self-documenting (said every developer too lazy to write real docs). There are only two [API](https://imgflip.com/api) endpoints.
- The `get_memes` endpoint (https://api.imgflip.com/get_memes) can be accessed via `imgflipgo.GetMemesWithResponse()` or `imgflipgo.GetMemes()`.
- The `caption_image` endpoint (https://api.imgflip.com/caption_image) can be accessed via `imgflipgo.CaptionImage(*CaptionRequest)`.For a concrete example of how to use the library, check out [example.go](https://github.com/Kardbord/imgflipgo/blob/main/example/example.go).