* Get the url for the request. (dependent on if we're requesting for the authenticated user or not) * @private * @param {string} endpoint - the endpoint being requested * @return {string} - the resolved endpoint
(endpoint)
| 31 | * @return {string} - the resolved endpoint |
| 32 | */ |
| 33 | __getScopedUrl(endpoint) { |
| 34 | if (this.__user) { |
| 35 | return endpoint ? |
| 36 | `/users/${this.__user}/${endpoint}` : |
| 37 | `/users/${this.__user}` |
| 38 | ; |
| 39 | |
| 40 | } else { // eslint-disable-line |
| 41 | switch (endpoint) { |
| 42 | case '': |
| 43 | return '/user'; |
| 44 | |
| 45 | case 'notifications': |
| 46 | case 'gists': |
| 47 | return `/${endpoint}`; |
| 48 | |
| 49 | default: |
| 50 | return `/user/${endpoint}`; |
| 51 | } |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | /** |
| 56 | * List the user's repositories |
no outgoing calls
no test coverage detected