https://github.com/kralizek/assembla.connector
A .NET Standard wrapper for Assembla REST API.
https://github.com/kralizek/assembla.connector
assembla dotnet-core dotnet-standard rest-api
Last synced: 9 months ago
JSON representation
A .NET Standard wrapper for Assembla REST API.
- Host: GitHub
- URL: https://github.com/kralizek/assembla.connector
- Owner: Kralizek
- License: mit
- Created: 2017-03-07T23:56:52.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2022-06-22T15:29:43.000Z (almost 4 years ago)
- Last Synced: 2025-07-04T08:41:28.286Z (10 months ago)
- Topics: assembla, dotnet-core, dotnet-standard, rest-api
- Language: C#
- Homepage:
- Size: 129 KB
- Stars: 3
- Watchers: 3
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
This repository contains a series of tools to easily integrate the REST API offered by [Assembla](https://www.assembla.com/).
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](http://api-docs.assembla.cc/content/api_reference.html) at hand.
### Authentication
As stated in the [documentation](http://api-docs.assembla.cc/content/authentication.html), 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
- [x] Spaces
- [x] Users
- [x] User roles
- [x] Tools
- [x] Tickets
- [x] Tags
- [x] Milestones
- [x] 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
```csharp
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());
var spaces = await assembla.Spaces.GetAllAsync();
spaces.Select(s => new {s.Id, s.WikiName, s.Name}).Dump();
```
You can execute this script in [LinqPad](http://www.linqpad.net/) by adding the following packages
* `Kralizek.Assembla.Connector`
* `Microsoft.Extensions.Logging`
or by downloading [this script](https://github.com/Kralizek/Assembla.Connector/blob/master/samples/LinqPad/list-your-spaces.linq).
## Versioning
This repository uses the [Semantic Versioning 2.0.0](http://semver.org/spec/v2.0.0.html).
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.