View Source CodestatsAPI (codestats_api v0.3.0)

This module is responsible for handling the requests to the Code::Stats API.

Summary

Functions

Returns the user's data from the Code::Stats API.

Functions

get_user_data(username)

@spec get_user_data(String.t()) ::
  {:ok, CodestatsAPI.Stats.t()}
  | {:error, :user_not_found}
  | {:error, :something_went_wrong}

Returns the user's data from the Code::Stats API.

Examples

iex> {:ok, %CodestatsAPI.Stats{} = result} = CodestatsAPI.get_user_data("cbic")
iex> result.user
"cbic"