Skip to content

Commit

Permalink
Recommend sponsorship
Browse files Browse the repository at this point in the history
  • Loading branch information
jacebrowning committed Mar 6, 2021
1 parent 86d6b0d commit 44bf210
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 44 deletions.
25 changes: 24 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ An API to programmatically generate memes based solely on requested URLs.
[![Coverage Status](http://img.shields.io/coveralls/jacebrowning/memegen/main.svg)](https://coveralls.io/r/jacebrowning/memegen)
[![Swagger Validator](https://img.shields.io/swagger/valid/3.0?label=docs&specUrl=https%3A%2F%2Fapi.memegen.link%2Fdocs%2Fswagger.json)](https://api.memegen.link/docs/)
[![License](https://img.shields.io/badge/license-mit-blue)](https://github.com/jacebrowning/memegen/blob/main/LICENSE.txt)
[![GitHub Sponsors](https://img.shields.io/badge/server%20costs-%2412%2Fmonth-red)](https://github.com/sponsors/jacebrowning)
[![GitHub Sponsors](https://img.shields.io/badge/requests-20M/month-red)](https://github.com/sponsors/jacebrowning)

[Buy me a coffee to help keep this site running!](https://www.buymeacoffee.com/jacebrowning)

Expand Down Expand Up @@ -78,3 +78,26 @@ For example, the <https://api.memegen.link/templates/ds/> template provides thes
You can also use your own image URL as the background. For example, <https://api.memegen.link/images/custom/_/my_background.png?background=http://www.gstatic.com/webp/gallery/1.png> produces:

<img alt="Custom Background" src="https://api.memegen.link/images/custom/_/my_background.png?background=http://www.gstatic.com/webp/gallery/1.png&watermark=none" style="max-width: 100%;">

# Zapier Integration

Incorporate memes into your automation: <https://zapier.com/apps/memegenlink>

# Sample Code

Here are some popular apps and integrations to check out:

| Platforms | Language | Website |
| :---------- | :--------- | :--------------------------------------------- |
| Slack | Python | <https://github.com/nicolewhite/slack-meme> |
| Slack | Go | <https://github.com/CptSpaceToaster/slackbot> |
| Slack | | <http://www.memetizer.com> |
| Hain | JavaScript | <https://github.com/Metrakit/hain-plugin-meme> |
| Web | Clojure | <https://github.com/jasich/mighty-fine-memes> |
| Web & Slack | | <https://memecomplete.com> |
| Discord | JavaScript | <https://github.com/parshsee/discordbot> |

Additional clients can be found by searching for [code examples](https://github.com/search?o=desc&q=%22api.memegen.link%22+&ref=searchresults&s=indexed&type=Code&utf8=%E2%9C%93) on GitHub.

Ready to build your own? Check out the [client page](clients).

68 changes: 25 additions & 43 deletions docs/clients.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
# Authentication

Unauthenticated API requests are watermarked and may be rate limited.
Those providing sponsorship at [$10/month](https://github.com/sponsors/jacebrowning) or above are welcome to an API key.
Please <a href="mailto:support@maketested.com?subject=memegen.link">contact us</a> to request one or inquire about pricing for your specific use case.

## HTTP Header

Authenticated requests can be made using a header:

```shell
$ curl "https://api.memegen.link/images/fry/http_header/example.png" --header "X-API-KEY: myapikey" --output http_header_example.png
```

## Query Parameter

If that's not an option, the API key can also be added as a query parameter:

```shell
$ curl "https://api.memegen.link/images/fry/query_parameter/example.png?api_key=myapikey" --output query_parameter_example.png
```

# Image Previews

If your client is going to show typeahead image previews, please use the `/images/preview.jpg` endpoint, which accepts URL-encoded parameters and returns smaller images to minimize bandwidth:
Expand Down Expand Up @@ -36,48 +58,8 @@ The `template` parameter can be a template ID or URL:
| Template URL | [/images/preview.jpg<wbr>?lines[]=first+line&lines[]=second+line<wbr>&template=https://api.memegen.link/images/fry.png](https://api.memegen.link/images/preview.jpg?lines[]=first+line&lines[]=second+line&template=https://api.memegen.link/images/fry.png) |
| Custom Background | [/images/preview.jpg<wbr>?lines[]=first+line&lines[]=second+line<wbr>&template=http://www.gstatic.com/webp/gallery/1.png](https://api.memegen.link/images/preview.jpg?lines[]=first+line&lines[]=second+line&template=http://www.gstatic.com/webp/gallery/1.png) |

# Sample Code

Here are some sample clients to explore:

| Platforms | Language | Website |
| :---------- | :--------- | :--------------------------------------------- |
| Slack | Python | <https://github.com/nicolewhite/slack-meme> |
| Slack | Go | <https://github.com/CptSpaceToaster/slackbot> |
| Slack | | <http://www.memetizer.com> |
| Hain | JavaScript | <https://github.com/Metrakit/hain-plugin-meme> |
| Web | Clojure | <https://github.com/jasich/mighty-fine-memes> |
| Web & Slack | | <https://memecomplete.com> |
| Discord | JavaScript | <https://github.com/parshsee/discordbot> |

Additional clients can be found by searching for [code examples on GitHub](https://github.com/search?o=desc&q=%22api.memegen.link%22+&ref=searchresults&s=indexed&type=Code&utf8=%E2%9C%93).

# Authentication

Unauthenticated API requests are watermarked and may be rate limited. To request an API key please <a href="mailto:support@maketested.com?subject=memegen.link">contact us</a> to inquire about pricing for your specific use case.

## HTTP Header

Authenticated requests can be made using a header:

```shell
$ curl "https://api.memegen.link/images/fry/http_header/example.png" --header "X-API-KEY: myapikey" --output http_header_example.png
```

## Query Parameter

If that's not an option, the API key can also be added as a query parameter:

```shell
$ curl "https://api.memegen.link/images/fry/query_parameter/example.png?api_key=myapikey" --output query_parameter_example.png
```

## Custom Watermark

Authenticated requests can also add their own watermark to images using the `watermark` query parameter. For example, <https://api.memegen.link/images/awesome/custom_watermark/example.png?api_key=myapikey&watermark=example.com>

![](https://api.memegen.link/images/awesome/custom_watermark/example.png?api_key=myapikey&watermark=example.com)
# Custom Watermark

# Zapier Integration
Authenticated requests can also add their own watermark to images using the `watermark` query parameter. For example, <https://api.memegen.link/images/puffin/custom_watermark/example.png?api_key=myapikey&watermark=example.com> produces:

The beta integration is available here: <https://zapier.com/apps/memegenlink>
![](https://api.memegen.link/images/puffin/custom_watermark/example.png?api_key=myapikey&watermark=example.com&height=400)

0 comments on commit 44bf210

Please sign in to comment.