https://github.com/openpeeps/pexels-nim
Nim library for the Pexels API
https://github.com/openpeeps/pexels-nim
api-client nim-clients nim-language openpeeps pexels
Last synced: 4 months ago
JSON representation
Nim library for the Pexels API
- Host: GitHub
- URL: https://github.com/openpeeps/pexels-nim
- Owner: openpeeps
- Created: 2024-09-15T01:40:46.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-15T03:44:47.000Z (almost 2 years ago)
- Last Synced: 2025-01-21T14:15:39.887Z (over 1 year ago)
- Topics: api-client, nim-clients, nim-language, openpeeps, pexels
- Language: Nim
- Homepage:
- Size: 197 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

👑 Nim library for the Pexels API
nimble install pexels
## 😍 Key Features
- [x] Search Pexels for photos & videos
- [x] Direct to Object parser
- [x] Written in Nim language
First, create your API key: https://www.pexels.com/api/
## Examples
**Search for Photos**
Search Pexels for any topic that you would like.
```nim
import pkg/pexels
let
px: Pexels = newPexelsClient(apikey = "123abc")
pics: PexelsPhotosResponse =
waitFor px.search("cat", perPage = 5)
for pic in pics:
echo pic.src.tiny
```
**Search for Videos**
```nim
import pkg/pexels
let
px = newPexelsClient(apikey = "123abc")
vids: PexelsVideosResponse =
waitFor px.videos("nature")
for vid in vids:
echo vid
```
### ❤ Contributions & Support
- 🐛 Found a bug? [Create a new Issue](/issues)
- 👋 Wanna help? [Fork it!](/fork)
- 😎 [Get €20 in cloud credits from Hetzner](https://hetzner.cloud/?ref=Hm0mYGM9NxZ4)
### 🎩 License
Pexels for Nim language | MIT license. [Made by Humans from OpenPeeps](https://github.com/openpeeps).
Copyright © OpenPeeps & Contributors — All rights reserved.