Installation
The sLocker packages for nine languages and the first call in each.
Version 0.2.1. Every package of a release has the same version and the same operations.
| Language | Package | Requirements |
|---|---|---|
| JavaScript / TypeScript | @superrouteca/slocker |
Node 20+, browsers, Deno, Bun |
| Python | superroute-slocker |
Python 3.9+ |
| PHP | superroute/slocker |
PHP 8.1+ |
| Java | ca.superroute:slocker |
Java 11+ |
| Kotlin / Android | ca.superroute:slocker-android |
Android, Kotlin coroutines, OkHttp |
| Go | github.com/Goodneo-Solutions/slocker-releases/go |
Go 1.21+ |
| C# / .NET | Superroute.SLocker |
.NET 8 |
| Dart / Flutter | slocker |
Dart 3.5+, Flutter |
| Swift (iOS, macOS) | SLocker |
iOS 15+, macOS 12+ |
License: Superroute SDK License
JavaScript / TypeScript
npm install @superrouteca/slocker@0.2.1
Python
pip install superroute-slocker==0.2.1
# import slocker
PHP
composer require superroute/slocker:0.2.1
Java
Add the Maven repository, then the package.
repositories {
maven { url = uri("https://goodneo-solutions.github.io/slocker-releases/maven") }
}
implementation("ca.superroute:slocker:0.2.1")
Kotlin / Android
Add the Maven repository, then the package.
repositories {
maven { url = uri("https://goodneo-solutions.github.io/slocker-releases/maven") }
}
implementation("ca.superroute:slocker-android:0.2.1")
Go
go get github.com/Goodneo-Solutions/slocker-releases/go@v0.2.1
C# / .NET
dotnet add package Superroute.SLocker --version 0.2.1
Dart / Flutter
dart pub add slocker:0.2.1
Swift (iOS, macOS)
Add the Swift package in Xcode or in Package.swift.
.package(url: "https://github.com/Goodneo-Solutions/slocker-releases", from: "0.2.1")
// product: "SLocker"
First call
Each client takes the token of the API account and the provider id. The calls below read one delivery task.
// JavaScript / TypeScript
import { SLockerClient } from '@superrouteca/slocker';
const sl = new SLockerClient({ token, providerId: 4611 });
const task = await sl.api.partnerLockerDelivery({ deliveryNo: 'PLD-01J2XYZ' });
# Python
from slocker import SLockerClient
sl = SLockerClient(token, provider_id=4611)
task = sl.partner_locker_delivery('PLD-01J2XYZ')
// PHP
use Superroute\SLocker\Client;
$sl = new Client($token, providerId: 4611);
$task = $sl->partnerLockerDelivery('PLD-01J2XYZ');
// Java
import ca.superroute.slocker.Client;
Client sl = Client.builder().token(token).providerId(4611L).build();
Object task = sl.partnerLockerDelivery("PLD-01J2XYZ");
// Kotlin / Android
val sl = SLockerAsync(Client.builder().token(token).providerId(4611L).transport(OkHttpTransport()).build())
val task = sl.api.partnerLockerDelivery(deliveryNo = "PLD-01J2XYZ") // suspend
// Go
import slocker "github.com/Goodneo-Solutions/slocker-releases/go"
sl := slocker.New(slocker.Config{Token: token, ProviderID: 4611})
task, err := sl.PartnerLockerDelivery(ctx, "PLD-01J2XYZ", nil)
// C# / .NET
using Superroute.SLocker;
var sl = new SLockerClient(new SLockerOptions { Token = token, ProviderId = 4611 });
var task = await sl.PartnerLockerDeliveryAsync("PLD-01J2XYZ");
// Dart / Flutter
import 'package:slocker/slocker.dart';
final sl = SLockerClient(token: token, providerId: 4611);
final task = await sl.partnerLockerDelivery(deliveryNo: 'PLD-01J2XYZ');
// Swift (iOS, macOS)
import SLocker
let sl = SLockerClient(token: token, providerId: 4611)
let task = try await sl.partnerLockerDelivery(deliveryNo: "PLD-01J2XYZ")
The base URL is https://api.superroute.ca unless another one is given, for example a white-label API host or a test environment.
Customer side
The customer side has its own packages on the sApp core: the customer client of each language and, for apps, the UI kit with the pickup list and the locker map. The carrier packages above do not depend on sApp.
| Language | Customer client | UI kit |
|---|---|---|
| JavaScript / TypeScript | @superrouteca/slocker-customer |
@superrouteca/slocker-ui, @superrouteca/slocker-react, @superrouteca/slocker-react-native |
| Dart / Flutter | slocker_customer |
slocker_ui |
| Kotlin / Android | ca.superroute:slocker-customer-kotlin |
ca.superroute:slocker-ui-android |
| Java | ca.superroute:slocker-customer |
|
| C# / .NET | Superroute.SLocker.Customer |
Superroute.SLocker.UI, Superroute.SLocker.Wpf, Superroute.SLocker.WinForms |
| Python | superroute-slocker[customer] |
|
| PHP | superroute/slocker + superroute/sapp |
|
| Go | github.com/Goodneo-Solutions/slocker-releases/go/customer |
|
| Swift (iOS, macOS) | SLockerCustomer |
SLockerUI |
JavaScript / TypeScript
npm install @superrouteca/slocker-customer@0.2.1
npm install @superrouteca/slocker-ui@0.2.1 # web
npm install @superrouteca/slocker-react@0.2.1 # React
npm install @superrouteca/slocker-react-native@0.2.1 # React Native
Dart / Flutter
dart pub add slocker_customer:0.2.1
flutter pub add slocker_ui:0.2.1
Kotlin / Android
repositories {
maven { url = uri("https://goodneo-solutions.github.io/slocker-releases/maven") }
}
implementation("ca.superroute:slocker-customer-kotlin:0.2.1")
implementation("ca.superroute:slocker-ui-android:0.2.1")
Java
repositories {
maven { url = uri("https://goodneo-solutions.github.io/slocker-releases/maven") }
}
implementation("ca.superroute:slocker-customer:0.2.1")
C# / .NET
dotnet add package Superroute.SLocker.Customer --version 0.2.1
dotnet add package Superroute.SLocker.Wpf --version 0.2.1 # or Superroute.SLocker.WinForms
Python
pip install "superroute-slocker[customer]==0.2.1"
# from slocker.customer import customer
PHP
composer require superroute/slocker:0.2.1 superroute/sapp
# Superroute\SLocker\Customer
Go
go get github.com/Goodneo-Solutions/slocker-releases/go/customer@v0.2.1
Swift (iOS, macOS)
The Swift packages of the customer side come from their own public release repository. Add it in Swift Package Manager and choose the products SLockerCustomer (customer client) and SLockerUI (UI kit).
.package(url: "https://github.com/Goodneo-Solutions/slocker-customer-releases", from: "0.2.1")
// in the target:
.product(name: "SLockerCustomer", package: "slocker-customer-releases"),
.product(name: "SLockerUI", package: "slocker-customer-releases")