Skip to content
 
 

Latest commit

 

History

16 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

PureEA.API - C# EA App API

A .NET API Wrapper for the EA App API Documentation is found below!

Installation

@JaydenMaalouf 's upstream stable build is available from NuGet through the PureOrigin.API metapackage:

  • PureOrigin.API However, it currently crashes because of a small change to the birthdate field.

Getting Started

Once you have added the NuGet Package to your Project, you will need to add the using PureEA.API; to your class header. Then simply instance the EADesktopAPI class with your EA Email and Password, like so:

var API = new EADesktopAPI("example@email.com", "password");

Then login to EA with the LoginAsync() call:

var result = await API.LoginAsync();

The result boolean will be set to true or false depending on the login success.

Now you can easily make calls to the API!

GetUserAsync()

If you already know a user's UserId or Username, you can use the GetUserAsync() method to return an EAUser object.

  • Username:
var user = await API.GetUserAsync("username");
  • UserId:
var user = await API.GetUserAsync(userId);

GetUsersAsync()

Same as GetUserAsync() but allows to search by generic terms.

  • This will return any users who's username starts with user:
var users = await API.GetUsersAsync("user");

GetAvatarUrlAsync()

If you're wanting to get a user's avatar, you can simply use .GetAvatarUrlAsync(); and it will return said avatar's url.

var user = await API.GetUserAsync("username");
var url = await user.GetAvatarUrlAsync();

Please note: This API wrapper is for educational purposes only. I am not affiliated with EA or any of their entities/affiliates.

About

A C# API Wrapper for EA app

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages