Git Product home page Git Product logo

baasic-sdk-net's Introduction

Baasic .NET SDK

Baasic .NET SDK provides core functionality for building web and mobile applications on Baasic. To get more information about Baasic REST API end-points please visit Developer Center.

Dependencies

Baasic .NET SDK library has the following dependencies:

Note: Ninject is not hard dependency, it can be installed as separate NuGet

Application Configuration

Baasic .NET SDK needs be initialized using ClientConfiguration with the following code:

/// <summary>
/// Dependency Injection Module containing Baasic Client bindings.
/// </summary>
public class AppClientConfiguration : ClientConfiguration
{
    #region Fields

    private const string apiKey = "<api-key>";

    #endregion Fields

    #region Constructors

    /// <summary>
    /// Initializes a new instance of the <see cref="AppClientConfiguration" /> class.
    /// </summary>
    /// <param name="tokenHandler">The token handler.</param>
    public AppClientConfiguration(ITokenHandler tokenHandler)
        : base(apiKey, tokenHandler)
    {
    }

    #endregion Constructors
}

...

/// <summary>
/// Dependency Injection Module containing Baasic Client bindings.
/// </summary>
public partial class DIModule : IDIModule
{
    #region Methods

    /// <summary>
    /// Load dependency injection bindings.
    /// </summary>
    /// <param name="dependencyResolver"></param>
    public virtual void Load(IDependencyResolver dependencyResolver)
    {
        #region Configuration
        
        dependencyResolver.Register<Baasic.Client.Configuration.IClientConfiguration, AppClientConfiguration>();

        #endregion Configuration
    }

    #endregion Methods
}

Note: To obtain a Baasic Application Identifier please create your application on Baasic Registration page.

Baasic .NET SDK has a built-in rudimentary DI container, if you want to use more robust DI container like Ninject please install [Baasic.Client.Ninject] (https://www.nuget.org/packages/Baasic.Client.Ninject/).

If you want to use Baasic .NET SDK inside the ASP.NET Web application then you need to install Baasic Client WebHost in order to automatically setup Baasic token handling.

Contributing

Pull requests are always welcome

We appreciate pull requests you make, and we'll do our best to process them as quickly as we can. Even if it's just a typo you found or any small or large issue you fixed - please do it! It will help us a lot.

If your pull request is not accepted on your first try, don't be discouraged! If there's a problem with your implementation, hopefully you received feedback on what to improve.

Issue reporting

Before you create a new issue, please make sure it hasn't already been reported. In case it already exists simply add a quick "+1" or "I have the same problem" to the existing issue thread.

Other
  • Help us write the documentation
  • Looking for something else? Get in touch..

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.