Returns a list of mini-venues partially matching the search term, near the location.
@see https://developer.foursquare.com/docs/venues/suggestcompletion
@param array $params
@return array
4316
public function suggestCompletion(array $params = array())
    {
        $resource = '/venues/suggestcompletion';
        $response = $this->makeApiRequest($resource, $params);

        if(property_exists($response, 'minivenues')) {
            return $response->minivenues;
        }

        return array();
    }
1275112
public function search($params)
    {
        $query = QueueManager::find()->orderBy('id desc');

        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);

        if (!($this->load($params) && $this->validate())) {
            return $dataProvider;
        }

        $query->andFilterWhere([
            'id' => $this->id,
            'ttr' => $this->ttr,
            'delay' => $this->delay,
            'priority' => $this->priority,
            'result_id' => $this->result_id,
//            'created_at' => $this->created_at,
//            'updated_at' => $this->updated_at,
            'start_execute' => $this->start_execute,
            'end_execute' => $this->end_execute,
        ]);

        $this->dayCondition($query, 'created_at');
        $this->dayCondition($query, 'updated_at');

        $query->andFilterWhere(['like', 'name', $this->name])
            ->andFilterWhere(['like', 'sender', $this->sender])
            ->andFilterWhere(['like', 'status', $this->status])
            ->andFilterWhere(['like', 'class', $this->class])
            ->andFilterWhere(['like', 'properties', $this->properties])
            ->andFilterWhere(['like', 'data', $this->data])
            ->andFilterWhere(['like', 'result', $this->result]);


        return $dataProvider;
    }
659123
public function search($params)
    {
        $query = Seo::find();
        $dataProvider = new ActiveDataProvider([
            'query' => $query,
            'sort' => [
                'defaultOrder' => ['id' => SORT_DESC],
            ],
        ]);
        $this->load($params);
        if (!$this->validate()) {
            return $dataProvider;
        }
        $query->andFilterWhere([
            Seo::tableName() . '.id' => $this->id,
        ])->andFilterWhere(['LIKE', Seo::tableName() . '.title', $this->title])
            ->andFilterWhere(['LIKE', Seo::tableName() . '.description', $this->description]);
        return $dataProvider;
    }
601224
public function facadeSearch(array $params)
	{
		$search = isset($params['q']) ? $params['q'] : null;
		$tag = isset($params['tag']) ? $params['tag'] : null;
		$limit = isset($params['limit']) ? (int) $params['limit'] : 1;

		$post = Post::with(array('tags', 'user'))
			->select('posts.*')
			->join('tags', 'posts.id', '=', 'tags.post_id')
			->orderBy('posts.publish_date', 'desc')
			->where('posts.active', 1)
			->where('posts.publish_date', '<=', new DateTime)
			->distinct();

		if ($search)
		{
			$post->where(function($query) use ($search)
			{
				$query->orWhere('title', 'like', '%'.$search.'%')
							->orWhere('content', 'like', '%'.$search.'%');
			});
		}

		if ($tag)
		{
			$post->where('tags.tag', '=', $tag);
		}

		return $post->skip(0)->take($limit)->get();
	}
1005515
public function search(array $params = array())
    {
        $endpoint = '/admin/gift_cards/search.json';
        $response = $this->request($endpoint, 'GET', $params);
        return $this->createCollection(GiftCard::class, $response['gift_cards']);
    }
221137
public function get(array $params = [])
    {
        $this->getLogger()->info('Getting list of layouts ');
        $entries = [];
        $hydratedRegions = [];
        $hydratedWidgets = [];
        $response = $this->doGet($this->url, $params);
        if (isset($params['embed']))
            $embed = ($params['embed'] != null) ? explode(',', $params['embed']) : [];

        foreach ($response as $item) {
            /** @var XiboLayout $layout */
            $layout = new XiboLayout($this->getEntityProvider());
            $layout->hydrate($item);
            foreach ($layout->regions as $reg) {
                /** @var XiboRegion $region */
                $region = new XiboRegion($this->getEntityProvider());
                $region->hydrate($reg);
                if (in_array('playlists', $embed) === true) {
                    /** @var XiboPlaylist $playlist */
                    $playlist = new XiboPlaylist($this->getEntityProvider());
                    $playlist->hydrate($reg['regionPlaylist']);
                    foreach ($playlist->widgets as $widget) {
                        /** @var XiboWidget $widgetObject */
                        $widgetObject = new XiboWidget($this->getEntityProvider());
                        $widgetObject->hydrate($widget);
                        $hydratedWidgets[] = $widgetObject;
                    }
                    $playlist->widgets = $hydratedWidgets;
                    $region->regionPlaylist = $playlist;
                }
                // Add to parent object
                $hydratedRegions[] = $region;
            }
            $layout->regions = $hydratedRegions;

            $entries[] = clone $layout;
        }

        return $entries;
    }
627672
public function search($params)
    {
        $query = Z1User::find();

        // add conditions that should always apply here

        $dataProvider = new ActiveDataProvider([
            'query' => $query,
            'pagination' => [
                'pageSize' => 10,
            ],
            'sort' => [
                'defaultOrder' => [
                    'id' => SORT_DESC
                ],
            ],
        ]);

        $this->load($params);

        if (!$this->validate()) {
            // uncomment the following line if you do not want to return any records when validation fails
            // $query->where('0=1');
            return $dataProvider;
        }

        // grid filtering conditions
        $query->andFilterWhere([
            'id' => $this->id,
            'status' => $this->status,
            'created_at' => $this->created_at,
            'updated_at' => $this->updated_at,
        ]);

        $query->andFilterWhere(['like', 'username', $this->username])
            ->andFilterWhere(['like', 'auth_key', $this->auth_key])
            ->andFilterWhere(['like', 'password_hash', $this->password_hash])
            ->andFilterWhere(['like', 'password_reset_token', $this->password_reset_token])
            ->andFilterWhere(['like', 'email', $this->email]);

        return $dataProvider;
    }
503122
public function search($params)
    {
        $query = Banword::find();

        // add conditions that should always apply here

        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);

        $this->load($params);

        if (!$this->validate()) {
            // uncomment the following line if you do not want to return any records when validation fails
            // $query->where('0=1');
            return $dataProvider;
        }

        // grid filtering conditions
        $query->andFilterWhere([
            'id' => $this->id,
        ]);
        $query->andFilterWhere(['like', 'word', $this->word]);

        if ($this->created_at) {
            $createdAt = strtotime($this->created_at);
            $createdAtEnd = $createdAt + 24 * 3600;
            $query->andWhere(['between', 'created_at', $createdAt, $createdAtEnd]);
            // $query->andWhere("created_at >= {$createdAt} AND created_at <= {$createdAtEnd}");
        }

        return $dataProvider;
    }
1194130
public function getMatch($params = array())
    {
        $resource = 'georegion/suggest.json';
        $resource .= '?' . $this->buildQueryString($params);
        $response = $this->getServiceResponse($resource);

        $geoRegionsSuggest = new Models\ResponseGeoRegionSuggestGet($response);

        return $geoRegionsSuggest;
    }
378946
public function all(array $params = array())
    {
        $endpoint = '/admin/blogs.json';
        $response = $this->request($endpoint, 'GET', $params);
        return $this->createCollection(Blog::class, $response['blogs']);
    }
1067920
def locations(params={})
      args = [ :query, :lat, :lon, :count ]
      params.each do |k,v|
        if !args.include?(k)
          raise ArgumentError.new 'Search term not allowed: ' + k.to_s
        end
      end

      if !params.include?(:query)
        raise ArgumentError.new '"query" term with location name is required'
      end

      results = get('locations', params)
      if results.key?("location_suggestions")
        results["location_suggestions"].map { |l| Location.new(self, l) }
      else
        nil
      end
    end
803334
public function getSearchQuery($params)
    {
        $data['query'] = [];
        $data['query']['ands'] = [];

        if (isset($params[self::INPUT_CONCEPTS])) {
            $data['query']['ands'] = $this->getInputConceptsQuery(
                $data['query']['ands'],
                $params[self::INPUT_CONCEPTS]
            );
        }

        if (isset($params[self::OUTPUT_CONCEPTS])) {
            $data['query']['ands'] = $this->getOutputConceptsQuery(
                $data['query']['ands'],
                $params[self::OUTPUT_CONCEPTS]
            );
        }

        if (isset($params[self::METADATA])) {
            $data['query']['ands'] = $this->getMetadataQuery($data['query']['ands'], $params[self::METADATA]);
        }

        if (isset($params[self::IMAGES])) {
            $data['query']['ands'] = $this->getImagesQuery($data['query']['ands'], $params[self::IMAGES]);
        }

        if (isset($params[self::REVERSED_IMAGES])) {
            $data['query']['ands'] = $this->getReverseImagesQuery(
                $data['query']['ands'],
                $params[self::REVERSED_IMAGES]
            );
        }

        return $data;
    }
903226
public function search($params)
    {
        $query = Question::find()->orderBy(['created_at' => SORT_DESC]);

        // add conditions that should always apply here

        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);

        $this->load($params);

        if (!$this->validate()) {
            // uncomment the following line if you do not want to return any records when validation fails
            // $query->where('0=1');
            return $dataProvider;
        }

        // grid filtering conditions
        $query->andFilterWhere([
            'id' => $this->id,
            'user_id' => $this->user_id,
            'price' => $this->price,
            'hide' => $this->hide,
            'answers' => $this->answers,
            'views' => $this->views,
            'followers' => $this->followers,
            'collections' => $this->collections,
            'comments' => $this->comments,
            'status' => $this->status,
            'created_at' => $this->created_at,
            'updated_at' => $this->updated_at,
        ]);

        $query->andFilterWhere(['like', 'title', $this->title])
            ->andFilterWhere(['like', 'alias', $this->alias])
            ->andFilterWhere(['like', 'content', $this->content]);

        return $dataProvider;
    }
1176349
public function getRequestTargetWithParams($params)
    {
        $target = $this->getFullPath();

        if ($params) {
            $target .= '?' . http_build_query($params);
        }

        return $target;
    }
698773
public function getMissingResources(MissingResourcesParameters $params = null) {
        $requestData = $this->getDefaultRequestData('query', is_null($params) ? [] : $params->exportToArray());

        return $this->sendRequest('missing-resources', $requestData, self::HTTP_METHOD_GET);
    }
255599
public function trending(array $params = array())
    {
        $resource = '/venues/trending';
        $response = $this->makeApiRequest($resource, $params);

        if(property_exists($response, 'venues')) {
            return $response->venues;
        }

        return array();
    }
367666
public function search($params)
    {
        $query = Note::find();

        $query->orderBy(['id' => SORT_DESC]);

        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);

        $this->load($params);

        if (!$this->validate()) {
            // uncomment the following line if you do not want to return any records when validation fails
            // $query->where('0=1');
            return $dataProvider;
        }

        // grid filtering conditions
        $query->andFilterWhere([
            'id' => $this->id,
            'user_id' => $this->user_id,
            'folder_id' => $this->folder_id,
            'type' => $this->type,
            'size' => $this->size,
            'views' => $this->views,
            'expired_at' => $this->expired_at,
            'created_at' => $this->created_at,
            'updated_at' => $this->updated_at,
        ]);

        $query->andFilterWhere(['like', 'uuid', $this->uuid])
            ->andFilterWhere(['like', 'title', $this->title])
            ->andFilterWhere(['like', 'format', $this->format])
            ->andFilterWhere(['like', 'content', $this->content])
            ->andFilterWhere(['like', 'ip', $this->ip]);

        return $dataProvider;
    }