Advertisement
ArtemisL

Untitled

Jun 24th, 2017
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. public function getPosts($user_id, $count, $offset = 0){
  2. return $this->api(
  3. 'users.getPosts',
  4. [
  5. 'user_id' => $user_id,
  6. 'count' => $count,
  7. 'offset' => $offset
  8. ]
  9. )->posts;
  10. }
  11.  
  12.  
  13. $posts = $nimses->getPosts($user->userId, 5);
  14. if(count($posts) > 0) {}
  15.  
  16. private $methods = [
  17. 'users' => [
  18. // nearby,nim
  19. 'getPosts' => [
  20. 'path' => 'v1.1/users/posts/:user_id:',
  21. 'method' => 'GET'
  22. ],
  23. ]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement