Skip to content

VladimirAnic/baasic-sdk-net

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Baasic .NET SDK

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%