Skip to content

A package for interfacing with KLIPY's GIF search directly in Dart using HTTP.

License

Notifications You must be signed in to change notification settings

Flyclops/klipy_dart

 
 

Repository files navigation

⚠️ NOT MAINTAINED ⚠️

After exploring the option of using KLIPY we have decided against it.

If you are interested in taking over this repo and package please do not hesitate to reach out via the issues and we will get it sorted out.

KLIPY Dart

KLIPY Dart Pub Package Build Status Coverage Status KLIPY Dart Stars License BSD 3-Clause

This package integrates KLIPY GIF search into Dart by utilizing the http package to communicate directly with the KLIPY API. It is currently using the migration from Tenor option.

Currently supported endpoints include: search, featured, categories, search suggestions, autocomplete, trending search terms, register share and posts.

KLIPY Dart Demo

Show some ❤️ and star the repo to support this package.

What to know

  • In order to start using KLIPY Dart you must obtain an API key by registering your project with KLIPY.
  • KLIPY requires proper attribution for projects using their API. This package does not handle the attribution process, so you will need to take care of it yourself.

Obtaining KLIPY API key

  1. Log in to the partner panel
  2. Add a new platform
  3. Click Create Key
  4. Copy the generated API key
  5. Provide this API key as a parameter to KlipyClient(apiKey: 'YOUR_API_KEY')

Usage

Installation

dart pub add klipy_dart

Having trouble? Read the pub.dev installation page.

Import

Import the package into the dart file where it will be used:

import 'package:klipy_dart/klipy_dart.dart';

Initialize

You must pass in a valid apiKey provided by KLIPY.

If you would like to distinguish between projects/devices then consider creating seperate API keys under the same platform.

final klipyClient = KlipyClient(apiKey: 'YOUR_API_KEY');

Example

For an example on each endpoint feel free to check out example/lib/main.dart.

Here is how you can get 20 of the latest featured GIFs and print the first one.

final klipyClient = KlipyClient(apiKey: 'YOUR_API_KEY');
final KlipyResponse? response = await klipyClient.featured(limit: 20);
final List<KlipyResultObject>? gifs = response?.results;
print(gifs?.first.media.tinygif?.url);

Looking for a UI?

If you're seeking a ready-made UI solution, check out KLIPY Flutter, which was designed based on the Tenor SDK guidelines.

What's next?

  • Documentation
  • Further improvements

Contributing

If you read this far then you are awesome! There are a multiple ways in which you can contribute:

  • Pick up any issue marked with "good first issue"
  • Propose any feature, enhancement
  • Report a bug
  • Fix a bug
  • Write and improve some documentation
  • Send in a Pull Request 🙏

Packages

No packages published

Languages

  • Dart 61.3%
  • C++ 17.7%
  • CMake 14.9%
  • Ruby 2.2%
  • HTML 1.4%
  • Swift 1.3%
  • Other 1.2%