123456789_123456789_123456789_123456789_123456789_

Class: Octokit::User

Relationships & Source Files
Inherits: Object
Defined in: lib/octokit/user.rb

Overview

GitHub user class to generate API path urls

Class Method Summary

Class Method Details

.path(user) ⇒ String

Get the api path for a user

Parameters:

  • user (String, Integer)

    GitHub user login or id

Returns:

  • (String)

    User Api path

[ GitHub ]

  
# File 'lib/octokit/user.rb', line 10

def self.path(user)
  case user
  when String
    "users/#{user}"
  when Integer
    "user/#{user}"
  else
    'user'
  end
end