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

  1. 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.

Copy
import ballerinax/uber;
import ballerinax/log;

Step 2: Configure the connection credentials. You can now make the connection configuration using the access token

Copy
configurable http:BearerTokenConfig & readonly auth = ?;
uber:ClientConfig clientConfig = {
    auth : auth
};
uber:Client baseClient = check new Client(apiKeyConfig);

Step 3: Get user detail

Copy
public function main() {
    var response = baseClient->getUser();
    if (response is error) {
        log:printError(response.toString());
    } else { 
        log:printInfo(response.toString());
    }
}

Import

import ballerinax/uber;Copy

Metadata

Released date: 10 months ago

Version: 1.5.1

License: Apache-2.0


Compatibility

Platform: any

Ballerina version: 2201.4.1

GraalVM compatible: Yes


Pull count

Total: 

Current verison: 0


Weekly downloads


Source repository


Keywords

Lifestyle & Entertainment/Ride-Hailing
Cost/Paid

Contributors

Other versions

See more...