nginxsonarrradarrplexorganizrdashboardbookmarkapplication-dashboardmuximuxlandingpagestartpagelandinghtpcserverhomepagesabnzbdheimdallembycouchpotatonzbget
		
		
		
		
			You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							71 lines
						
					
					
						
							1.6 KiB
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							71 lines
						
					
					
						
							1.6 KiB
						
					
					
				
								<?php
							 | 
						|
								
							 | 
						|
								namespace Github\Api\CurrentUser;
							 | 
						|
								
							 | 
						|
								use Github\Api\AbstractApi;
							 | 
						|
								
							 | 
						|
								/**
							 | 
						|
								 * @link   http://developer.github.com/v3/users/followers/
							 | 
						|
								 *
							 | 
						|
								 * @author Joseph Bielawski <stloyd@gmail.com>
							 | 
						|
								 */
							 | 
						|
								class Followers extends AbstractApi
							 | 
						|
								{
							 | 
						|
								    /**
							 | 
						|
								     * List followed users by the authenticated user.
							 | 
						|
								     *
							 | 
						|
								     * @link http://developer.github.com/v3/repos/followers/
							 | 
						|
								     *
							 | 
						|
								     * @param int $page
							 | 
						|
								     *
							 | 
						|
								     * @return array
							 | 
						|
								     */
							 | 
						|
								    public function all($page = 1)
							 | 
						|
								    {
							 | 
						|
								        return $this->get('/user/following', [
							 | 
						|
								            'page' => $page,
							 | 
						|
								        ]);
							 | 
						|
								    }
							 | 
						|
								
							 | 
						|
								    /**
							 | 
						|
								     * Check that the authenticated user follows a user.
							 | 
						|
								     *
							 | 
						|
								     * @link http://developer.github.com/v3/repos/followers/
							 | 
						|
								     *
							 | 
						|
								     * @param string $username the username to follow
							 | 
						|
								     *
							 | 
						|
								     * @return array
							 | 
						|
								     */
							 | 
						|
								    public function check($username)
							 | 
						|
								    {
							 | 
						|
								        return $this->get('/user/following/'.rawurlencode($username));
							 | 
						|
								    }
							 | 
						|
								
							 | 
						|
								    /**
							 | 
						|
								     * Make the authenticated user follow a user.
							 | 
						|
								     *
							 | 
						|
								     * @link http://developer.github.com/v3/repos/followers/
							 | 
						|
								     *
							 | 
						|
								     * @param string $username the username to follow
							 | 
						|
								     *
							 | 
						|
								     * @return array
							 | 
						|
								     */
							 | 
						|
								    public function follow($username)
							 | 
						|
								    {
							 | 
						|
								        return $this->put('/user/following/'.rawurlencode($username));
							 | 
						|
								    }
							 | 
						|
								
							 | 
						|
								    /**
							 | 
						|
								     * Make the authenticated user un-follow a user.
							 | 
						|
								     *
							 | 
						|
								     * @link http://developer.github.com/v3/repos/followers/
							 | 
						|
								     *
							 | 
						|
								     * @param string $username the username to un-follow
							 | 
						|
								     *
							 | 
						|
								     * @return array
							 | 
						|
								     */
							 | 
						|
								    public function unfollow($username)
							 | 
						|
								    {
							 | 
						|
								        return $this->delete('/user/following/'.rawurlencode($username));
							 | 
						|
								    }
							 | 
						|
								}
							 | 
						|
								
							 |