Skip to content

techfooninja/habitrpg-api-dotnet-client

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HabitRPG API .NET Client

.NET Async HabitRPG Client Library

MyGet Build Status

How to install

To install HabitRPG.Client, run the following command in the Package Manager Console

Install-Package HabitRPG.Client

How to use

var configuration = new HabitRpgConfiguration()
{
  UserId = // UserId guid from HabitRPG,
  ApiToken = // ApiToken guid from HabitRPG,
  ServiceUri = new Uri(@"https://habitrpg.com/")
};

IUserClient _userClient = new UserClient(configuration);

var response = await _userClient.GetTasksAsync();

Supported methods

IUserClient

Task<ScoreResult> ScoreTaskAsync(string id, Direction direction);
Task<List<ITask>> GetTasksAsync();
Task<T> CreateTaskAsync<T>(T task) where T : ITask;
Task<T> GetTaskAsync<T>(string taskId) where T : ITask;
Task<T> UpdateTaskAsync<T>(T task) where T : ITask;
Task DeleteTaskAsync(string taskId);
Task<List<ITask>> ClearCompletedAsync();
Task<List<Item>> GetBuyableItemsAsync();
Task BuyItemAsync(string key);
Task<User> GetUserAsync();
Task CreateTagAsync(Tag tag);
Task UpdateTagAsync(Tag tag);    
Task DeleteTagAsync(string tagId);

IMembersClient

Task<Member> GetMemberAsync(string id);

IGroupsClient

Task<List<Group>> GetGroupsAsync(string types);
Task<Group> GetGroupAsync(string groupId);
Task<List<ChatMessage>> GetGroupChatAsync(string groupId);
Task<ChatMessage> SendChatMessageAsync(string groupId, string message);
Task DeleteChatMessageAsync(string groupId, string messageId);
Task LikeChatMessageAsync(string groupId, string messageId);

IContentClient

Task<Content> GetContentAsync(string language = "");

About

.NET Async HabitRPG Client Library

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 100.0%