# Bibliothèques client
GC Notification (opens new window) est basé sur le système de notification du gouvernement britannique. Par conséquent, l'API est également disponible en utilisant les clients développés par GOV.UK (opens new window) (disponible en anglais seulement).
# Avant d'intégrer l'API
Vous devrez modifier votre point de terminaison :
import uk.gov.service.notify.NotificationClient;
NotificationClient client = new NotificationClient(apiKey, "https://api.notification.canada.ca");
using Notify.Client;
var client = new NotificationClient(apiKey, "https://api.notification.canada.ca");
require __DIR__ . '/vendor/autoload.php';
$notifyClient = new \Alphagov\Notifications\Client([
'baseUrl' => "https://api.notification.canada.ca",
'apiKey' => 'your-api-key',
'httpClient' => new \Http\Adapter\Guzzle6\Client
]);
NotifyClient("https://api.notification.canada.ca", apiKey)
from notifications_python_client.notifications import NotificationsAPIClient
notifications_client = NotificationsAPIClient(
api_key,
base_url="https://api.notification.canada.ca"
)
require 'notifications/client'
client = Notifications::Client.new(api_key, "https://api.notification.canada.ca")
// Make sure to add code blocks to your code group
Différences de fonctionnalités à considérer
- L'envoi de fichiers par courriel est différent avec GC Notification
- La notification de masse n'est pas directement prise en charge par les clients de GOV.UK. Il est toutefois possible d'en utiliser un si celui-ci prend en charge la personnalisation du chemin de l'adresse HTTP
- L'envoi de lettres n'est pas disponible
- La réception de messages texte n'est pas disponible
# Clients de GOV.UK
- Java (opens new window) (disponible en anglais seulement)
- .NET (opens new window) (disponible en anglais seulement)
- NodeJS (opens new window) (disponible en anglais seulement)
- PHP (opens new window) (disponible en anglais seulement)
- Python (opens new window) (disponible en anglais seulement)
- Ruby (opens new window) (disponible en anglais seulement)