Giter Site home page Giter Site logo

assembla.connector's Introduction

This repository contains a series of tools to easily integrate the REST API offered by Assembla. The first tool being worked on is a REST API wrapper that will act as foundation for future tools.

Kralizek.Assembla.Connector

This library contains the REST API wrapper. The idea behind this package is to closely map the available methods. In addition, this library won't validate the correctness of your requests. So, be sure you have the API reference at hand.

Authentication

As stated in the documentation, Assembla API supports four type of authentication of the requests.

  • Key/Secret credentials: suitable for development environment, small one-user applications.
  • Client credentials suitable for applications that rely on public data and do not require user authentication.
  • 3-step authentication flow: suitable for browser based applications.
  • Pin Code suitable for desktop/mobile applications.

This library aims at supporting the first two scenarios out-of-the-box. The remaining scenarios will be supported by extensions packages.

Functionalities

Here is a list of sections of the exposed functionalities.

Implemented

  • Spaces
  • Users
  • User roles
  • Tools
  • Tickets
  • Tags
  • Milestones
  • Documents

Next in line

  • Stream
  • Mentions
  • Wiki
  • SSH keys

Later

  • Merge requests
  • StandUp reports
  • Webhooks
  • Tasks
  • Portfolio

Example

Here is a small example of how to query for the list of all the spaces available to the current user

ILoggerFactory loggerFactory = new LoggerFactory();

HttpClient client = new HttpClient { BaseAddress = new Uri(@"https://api.assembla.com") };
client.DefaultRequestHeaders.Add("X-Api-Key", "yourApiKey");
client.DefaultRequestHeaders.Add("X-Api-Secret", "yourSecretKey");

IAssemblaClient assembla = new HttpAssemblaClient(client, loggerFactory.CreateLogger<HttpAssemblaClient>());

var spaces = await assembla.Spaces.GetAllAsync();

spaces.Select(s => new {s.Id, s.WikiName, s.Name}).Dump();

You can execute this script in LinqPad by adding the following packages

  • Kralizek.Assembla.Connector
  • Microsoft.Extensions.Logging

or by downloading this script.

Versioning

This repository uses the Semantic Versioning 2.0.0. The packages whose major version is 0 are to be considered in their initial development phase, therefore their public programming interface cannot be considered stable.

Future development

When the wrapper library is complete, additional tools can be built upon it. Ideas I have but are not limited to are

  • An ASP.NET Core drop-in middleware to handle authentication
  • A PowerShell module
  • A high-level library with a more cohesive and semantic richer programming interface.

Support

Since I am not affiliated with Assembla in any way, this package might stop working at any moment due to unannounced API changes or similar causes. For these reasons, you use this package at your own risk.

Anyway, if anything breaks, feel free to send a PR with the solution ;)

Disclaimer

All product and company names are trademarks™ or registered® trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.

assembla.connector's People

Contributors

elindanielsson avatar kralizek 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.