itsAdee / 4-g-specs-dotnet-sdk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Getting Started with Verizon

Introduction

The Verizon Edge Discovery Service API can direct your application clients to connect to the optimal service endpoints for your Multi-access Edge Computing (MEC) applications for every session. The Edge Discovery Service takes into account the current location of a device, its IP anchor location, current network traffic and other factors to determine which 5G Edge platform a device should connect to.

Verizon Terms of Service: https://www.verizon.com/business/5g-edge-portal/legal.html

Install the Package

If you are building with .NET CLI tools then you can also use the following command:

dotnet add package 4GSpecsSDK --version 1.3.0

You can also view the package at: https://www.nuget.org/packages/4GSpecsSDK/1.3.0

Initialize the API Client

Note: Documentation for the client can be found here.

The following parameters are configurable for the API Client:

Parameter Type Description
VZM2mToken string M2M Session Token (How to generate an M2M session token?)
Environment Environment The API environment.
Default: Environment.Production
Timeout TimeSpan Http client timeout.
Default: TimeSpan.FromSeconds(100)
Oauth2Credentials Oauth2Credentials The Credentials Setter for OAuth 2 Client Credentials Grant
ThingspaceOauthCredentials ThingspaceOauthCredentials The Credentials Setter for OAuth 2 Client Credentials Grant

The API client can be initialized as follows:

Verizon.Standard.VerizonClient client = new Verizon.Standard.VerizonClient.Builder()
    .Oauth2Credentials(
        new OAuth2Model.Builder(
            "OAuthClientId",
            "OAuthClientSecret"
        )
        .OauthScopes(
            new List<OauthScopeOauth2Enum>
            {
                OauthScopeOauth2Enum.Discoveryread,
                OauthScopeOauth2Enum.Serviceprofileread,
            })
        .Build())
    .ThingspaceOauthCredentials(
        new ThingspaceOauthModel.Builder(
            "OAuthClientId",
            "OAuthClientSecret"
        )
        .Build())
    .VZM2mToken("VZ-M2M-Token")
    .Environment(Verizon.Standard.Environment.Production)
    .Build();

API calls return an ApiResponse object that includes the following fields:

Field Description
StatusCode Status code of the HTTP response
Headers Headers of the HTTP response as a Hash
Data The deserialized body of the HTTP response as a String

Authorization

This API uses the following authentication schemes.

List of APIs

Classes Documentation

About

License:Other


Languages

Language:C# 100.0%