heypster SDKs.

Install an SDK for your platform and add a GIF picker to your app.

Apple SDK

Add the https://gitlab.com/heypster/heypster-sdk.git repository in Xcode with Swift Package Manager. The SDK requires iOS 16, watchOS 9, visionOS 1, or macOS 11 or later. The HeypsterView picker is available on iOS and visionOS.

Initialize the client at launch, for example in your SwiftUI app initializer.

Swift · Initialize the client
import HeypsterSDK

HeypsterClient.initialize(
    configuration: .init(secret: "YOUR_APP_SECRET", id: "YOUR_APP_ID")
)

Present the picker in a SwiftUI sheet and receive the GIF in the callback.

SwiftUI · Open the picker
import SwiftUI
import HeypsterSDK

struct GifPickerButton: View {
    @State private var showsPicker = false

    var body: some View {
        Button("Choose a GIF") { showsPicker = true }
            .sheet(isPresented: $showsPicker) {
                HeypsterView { gif in
                    // Pass the selected GIF to your interface.
                }
            }
    }
}

To test the integration, open HeypsterSDK.xcworkspace and run the Demo target. Display the selection in your interface with GIFView.

Apple SDK repository

Android SDK

Android 7.0 (API 24) or later. Download the AAR module from the repository and place it in libs. Add these dependencies to your app module.

Gradle · build.gradle.kts
dependencies {
    implementation("com.google.android.material:material:1.12.0")
    implementation("com.google.code.gson:gson:2.10.1")
    implementation(files("libs/HeypsterSDK_1.0.0.aar"))
}

Initialize the client with your key, then open HeypsterView from a FragmentActivity. Declare a com.heypster.sdk.views.GifView view with the ID gifView in your layout.

Kotlin · Select and display a GIF
HeypsterClient.initialize("YOUR_HEYPSTER_API_KEY")

val target = findViewById<GifView>(R.id.gifView)
findViewById<Button>(R.id.button).setOnClickListener {
    HeypsterView { gif ->
        target.loadGif(gif)
    }.show(supportFragmentManager)
}

Android SDK repository

Web SDK

Install the package and import its entry point. The example uses gif_button as the ID of the button that opens the picker.

Terminal · Install the package
npm install heypster-gif
JavaScript · Initialize and open the picker
import HeypsterGifSDK from './node_modules/heypster-gif/index.js';

const picker = new HeypsterGifSDK(
  'YOUR_HEYPSTER_API_KEY', true, 'fr', 'top', 'v1',
);

document.querySelector('#gif_button').addEventListener('click', () => {
  picker.togglePopup();
});

window.addEventListener('heypsterGifClicked', ({ detail }) => {
  const { gifMini, h264 } = detail;
  // Utilisez l’URL GIF Mini ou l’URL vidéo H.264 dans votre interface.
});
Web constructor options
OptionPurpose
apiKeyYour application’s heypster API key. Required.
initializeUse true to prepare the picker on page load. Defaults to false.
languageSecondary interface language. Defaults to fr. Text and tag searches run in English.
positiontop by default, or bottom.
interfaceUse v1 for search and categories, v2 for emoji and tags as well, or v3 to include external results.
externalMAX plan. Configures an external provider with provider and key.

For lazy loading, call initialize() before the first togglePopup() call.

View language codes

Flutter SDK

The SDK works on iOS, Android, Web, macOS, Windows, and Linux. Add the repository as a Git dependency in your Flutter project.

YAML · pubspec.yaml
dependencies:
  heypster_flutter_sdk:
    git:
      url: https://github.com/heypster/heypster-flutter-sdk.git
      ref: v1.0.0
Dart · Configure heypster
import 'package:heypster_flutter_sdk/heypster_flutter_sdk.dart';

// At startup, before runApp.
HeypsterFlutterSDK.configure(apiKey: 'YOUR_HEYPSTER_API_KEY');

In MaterialApp, add HeypsterLocalizations.delegate to your delegates and HeypsterLocalizations.supportedLocales to your supported locales. Connect selection to a HeypsterMediaSelectionListener, then open the picker with the widget context.

Dart · Open the picker
HeypsterDialog.instance.addListener(this);
HeypsterDialog.instance.show(context: context);

Display the selection with HeypsterMediaView, or embed a grid in your interface with HeypsterGridView.

Flutter repository and examples

Access and support

For application credentials or integration questions, email contact@heypster.com.

Read the REST reference