Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ninpl/UTrelloFix
https://github.com/ninpl/UTrelloFix
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ninpl/UTrelloFix
- Owner: ninpl
- License: apache-2.0
- Created: 2016-08-16T21:45:45.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-12T13:01:35.000Z (over 6 years ago)
- Last Synced: 2024-05-13T20:58:35.542Z (6 months ago)
- Language: C#
- Size: 2.53 MB
- Stars: 4
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-unity-open-source-on-github - UTrelloFix - Creating Trello cards in your own boards from your Unity app (Trello)
README
UTrello Fix
==================This is a simple C# system for creating Trello cards in your own boards from your Unity app or game. Some use cases may be crash reports, significant events etc.
## Installation
Just drag these `.cs` files into your scripts folder, wherever you like. If you already have `MiniJson` in your project, you may get a namespace conflict. No matter, just delete the one from this repo.
## Usage
Go ahead and grab a Trello Application Key from: https://trello.com/1/appKey/generate. Grab the application key, I'll refer to this as the `key` from now on.
Now head to: https://trello.com/1/connect?key=[yourkeygoeshere]&name=Your%20App&response_type=token&scope=read,write&expiration=never
In your browser (make sure to fill in your key from just before). You'll be taken to https://trello.com/1/token/approve, and the token code given will be your `token`.
## Example Code
using UnityEngine;
using System.Collections;
using MiniJSON;
using System.Collections.Generic;
using Trello;
public class RunAtStart : MonoBehaviour {
// Use this for initialization
IEnumerator Start () {
var trello = new Trello.Trello(YOUR-KEY, YOUR-TOKEN);
// Async, do not block
yield return trello.populateBoards();
trello.setCurrentBoard("Your Game");
// Async, do not block
yield return trello.populateLists();
trello.setCurrentList("Achievements");
var card = trello.newCard();
card.name = "Unity Test";
card.desc = "Description";
card.due = "11/12/2014";
yield return trello.uploadCard(card);
// You can use the helper method to upload exceptions with relevant data
try
{
throw new UnityException("Testing");
} catch (UnityException e)
{
trello.uploadExceptionCard(e);
}
}
}## Errors
If you see a `401 Unauthorized` message returnd, it likely means your `key` or `token` are invalid or have expired. Try generate new ones and trying again, if you're having trouble get in touch with me.