public function search($query) { $res = $this->instagram->get(Tag::API_SEGMENT . 'search', ['q' => $query]); $arr = []; foreach ($res->data as $item) { $tag = new Tag($this->instagram, $item->name); $tag->setData($item); array_push($arr, $tag); } return $arr; }
/** * @param string $fb_places_id * @param int $distance * @return mixed|\Psr\Http\Message\ResponseInterface */ public function searchByFbPlacesId($fb_places_id = '', $distance = 500) { $res = $this->instagram->get(Location::API_SEGMENT . 'search', ['facebook_places_id' => $fb_places_id, 'distance' => $distance]); $arr = []; foreach ($res->data as $item) { $tag = new Location($this->instagram, $item->id); $tag->setData($item); array_push($arr, $tag); } return $arr; }
/** * @param $q * @param bool $count * @return mixed|\Psr\Http\Message\ResponseInterface */ public function search($q, $count = false) { $res = $this->instagram->get(User::API_SEGMENT . 'search', ['q' => $q, 'count' => $count ?: '']); $arr = []; foreach ($res->data as $item) { $user = new User($this->instagram, $item->id); $user->setData($item); array_push($arr, $user); } return $arr; }
/** * @return mixed */ public function unlike() { return $this->instagram->delete(Media::API_SEGMENT . $this->id . '/likes'); }
/** * @param $target * @return mixed|\Psr\Http\Message\ResponseInterface */ public function ignore($target) { return $this->instagram->post(Relationships::API_SEGMENT . $target . '/relationship', ['action' => 'ignore']); }