thank_you_stars v0.1.0 ThankYouStars View Source

Helper functions for thank_you_stars task

Link to this section Summary

Functions

fetch github url of package from hex.pm/api/packages

get github url from json. field name is GitHub, Github or github

load dependency packages from mix.exs

load github api token from “$HOME/.thank_you_stars.json” file. format is { "token": "SET_YOUR_TOKEN_HERE" }

star package’s GitHub repository using GitHub API

star package’s GitHub repository

Link to this section Functions

Link to this function fetch_package_github_url(package_name) View Source
fetch_package_github_url(package_name :: binary) :: binary

fetch github url of package from hex.pm/api/packages .

Link to this function github_url(links) View Source
github_url(links :: map) :: {:ok, binary} | {:error, nil}

get github url from json. field name is GitHub, Github or github.

Link to this function load_deps_packages() View Source
load_deps_packages() :: [binary]

load dependency packages from mix.exs.

Link to this function load_token() View Source
load_token() :: binary

load github api token from “$HOME/.thank_you_stars.json” file. format is { "token": "SET_YOUR_TOKEN_HERE" } .

Link to this function star_github_package(url, client) View Source
star_github_package(url :: binary, client :: Tentacat.Client.t) ::
  {:ok, binary} |
  {:error, binary}

star package’s GitHub repository using GitHub API.

Link to this function star_package(package_name, client) View Source
star_package(package_name :: binary, client :: Tentacat.Client.t) :: binary

star package’s GitHub repository.