Skip to content

usmanager/registration-client-csharp

Repository files navigation

Registration-client-csharp

Cliente api que executa pedidos ao registration server (eureka) para registar esta instância ou obter servidores com o qual pode comunicar.
Para ser usado em microserviços implementados em c#.

This C# SDK is automatically generated by the Swagger Codegen project:

  • API version: 1.0.0
  • SDK version: 1.0.0
  • Build package: io.swagger.codegen.languages.CSharpClientCodegen

Frameworks supported

  • .NET 4.0 or later
  • Windows Phone 7.1 (Mango)

Dependencies

The DLLs included in the package may not be the latest version. We recommend using NuGet to obtain the latest version of the packages:

Install-Package RestSharp
Install-Package Newtonsoft.Json
Install-Package JsonSubTypes

NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See RestSharp#742

Installation

Run the following command to generate the DLL

  • [Mac/Linux] /bin/sh build.sh
  • [Windows] build.bat

Then include the DLL (under the bin folder) in the C# project, and use the namespaces:

using Pt.Unl.Fct.Miei.Usmanagement.Manager.Api;
using Pt.Unl.Fct.Miei.Usmanagement.Manager.Client;
using Pt.Unl.Fct.Miei.Usmanagement.Manager.Model;

Packaging

A .nuspec is included with the project. You can follow the Nuget quickstart to create and publish packages.

This .nuspec uses placeholders from the .csproj, so build the .csproj directly:

nuget pack -Build -OutputDirectory out Pt.Unl.Fct.Miei.Usmanagement.Manager.csproj

Then, publish to a local feed or other host and consume the new package via Nuget as usual.

Getting Started

using System;
using System.Diagnostics;
using Pt.Unl.Fct.Miei.Usmanagement.Manager.Api;
using Pt.Unl.Fct.Miei.Usmanagement.Manager.Client;
using Pt.Unl.Fct.Miei.Usmanagement.Manager.Model;

namespace Example
{
    public class Example
    {
        public void main()
        {

            var apiInstance = new EndpointsApi();
            var service = service_example;  // string | Service name

            try
            {
                // Obtém o melhor endpoint para o serviço {service}
                Endpoint result = apiInstance.GetServiceEndpoint(service);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling EndpointsApi.GetServiceEndpoint: " + e.Message );
            }

        }
    }
}

Documentation for API Endpoints

All URIs are relative to http://localhost:1906/api

Class Method HTTP request Description
EndpointsApi GetServiceEndpoint GET /services/{service}/endpoint Obtém o melhor endpoint para o serviço {service}
EndpointsApi GetServiceEndpoints GET /services/{service}/endpoints Obtém todos os endpoints registados em nome do serviço {service}
EndpointsApi RegisterEndpoint POST /register Regista o endpoint no servidor eureka

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization.

Licença

Registration-client-cpp está licenciado com a MIT license. Ver a licença no cabeçalho do respetivo ficheiro para confirmar.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages