Module uber
ballerinax/uber Ballerina library
1.5.1
Overview
Ballerina connector for Uber, connects the Uber REST API via Ballerina language easily. Uber has stopped accepting new apps a while ago. You may not be able to register a new app. If you are a registered Uber user, you may be able to use the REST API.
This module supports REST API version v1.2 of Uber.
Configuring Connector
Prerequisites
- An Uber Account
Obtaining tokens
-
Please follow this link to obtain tokens
Quickstart
- Get User Detail
Step 1: Import Uber module First, import the ballerinax/uber module into the Ballerina project and the log module.
import ballerinax/uber; import ballerinax/log;
Step 2: Configure the connection credentials. You can now make the connection configuration using the access token
configurable http:BearerTokenConfig & readonly auth = ?; uber:ClientConfig clientConfig = { auth : auth }; uber:Client baseClient = check new Client(apiKeyConfig);
Step 3: Get user detail
public function main() { var response = baseClient->getUser(); if (response is error) { log:printError(response.toString()); } else { log:printInfo(response.toString()); } }