Giter Club home page Giter Club logo

sparklrsharp's Introduction

#SparklrSharp SparklrSharp is an asynchronous implementation of the Sparklr* web-API. It tries to create further abstraction. This means, that web-API changes will only need to be implemented in this library and not in your code. You just update the library and everything (should) work fine.

SparklrSharp is a portable class library with support for .NET 4.5, Windows Phone 7.5, 7.8 and Windows Phone 8 as well as Windows Store applications. On some packages you might need to add the Microsoft.Bcl.Async-nuget.

#ToDo To enable UnitTest, you need to create a Credentials.cs-file with the folllowing contents in the SparklrTests-project

using SparklrSharp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SparklrTests
{
    internal static class Credentials
    {
        //Insert valid credentials here
        internal const string ValidUsername = ;
        internal const string ValidPassword = ;

        //Insert invalid credentials here
        internal const string InvalidPassword = ;

        internal static async Task<Connection> CreateSession()
        {
            Connection conn = new Connection();
            bool result = await conn.Signin(ValidUsername, ValidPassword);

            if (result)
                return conn;
            else
                throw new Exception("Failed to authenticate");
        }
    }
}

#Usage There is a small example included in this solution. In most cases, you'll only need to add the following namespaces and you're ready to go:

using SparklrSharp;
using SparklrSharp.Sparklr;

Then you can create a new connection

Connection conn = new Connection();

On this connection you can sign in and run calls

bool signedIn = await conn.SigninAsync(username, password);

if(signedIn)
{
    //Refresh inbox
    await conn.RefreshInboxAsync();
}

sparklrsharp's People

Contributors

chrisk91 avatar

Watchers

 avatar

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.