# GetPopularPostsQuery

class GetPopularPostsQuery extends AbstractQuery

Builds URL for GetPopularPosts REST-API calls.

Also holds the response after being executed.

## Methods

__construct(string $resourceType, string $grouping, string $groupingName, int $start, int $end)

The query constructor builds the url and saves it into the url property.

$this
execute(Client $httpClient)

Execute a prepared query.

integer
getStatusCode()

No description

from AbstractQuery
bool
isExecuted()

No description

from AbstractQuery
array
getHeaders()

No description

from AbstractQuery
string
getReasonPhrase()

No description

from AbstractQuery
string
getBody()

No description

from AbstractQuery
ModelObject
model()

No description

from AbstractQuery
array
csl()

No description

from AbstractQuery
string
bibliography(string $bibliographyStyleName, string $lang = 'en-US', string $bibliographyStyle = '')

No description

from AbstractQuery
string
bibtex()

No description

from AbstractQuery
string
endnote()

No description

from AbstractQuery

## Details

###
at line 57
`__construct(string $resourceType, string $grouping, string $groupingName, int $start, int $end)`

The query constructor builds the url and saves it into the url property.

GET /posts/popular ?resourcetype=(bibtexǀbookmark)

#### Parameters

string | $resourceType | the requested resourcetype
string | $grouping | determines to which group $groupingName belongs
string | $groupingName | name of user or group who/which created the posts
int | $start | start index
int | $end | end index

###
at line 85
`$this execute(Client $httpClient)`

Execute a prepared query.

#### Parameters

Client | $httpClient |

#### Return Value

$this |

###
in AbstractQuery at line 128
`integer getStatusCode()`

#### Return Value

integer |

###
in AbstractQuery at line 135
`bool isExecuted()`

#### Return Value

bool |

###
in AbstractQuery at line 142
`array getHeaders()`

#### Return Value

array |

###
in AbstractQuery at line 149
`string getReasonPhrase()`

#### Return Value

string |

###
in AbstractQuery at line 157
`string getBody()`

#### Return Value

string |

#### Exceptions

UnsupportedOperationException |

###
in AbstractQuery at line 175
`ModelObject model()`

#### Return Value

ModelObject |

#### Exceptions

UnsupportedOperationException |

###
in AbstractQuery at line 192
`array csl()`

#### Return Value

array |

#### Exceptions

UnsupportedOperationException |

###
in AbstractQuery at line 218
`string bibliography(string $bibliographyStyleName, string $lang = 'en-US', string $bibliographyStyle = '')`

#### Parameters

string | $bibliographyStyleName | supported styles: 'apa', 'din-1505-2', 'ieee', 'harvard1', 'harvard7de', 'vancouver'
string | $lang |
string | $bibliographyStyle |

#### Return Value

string |

#### Exceptions

FileNotFoundException |
UnsupportedOperationException |

###
in AbstractQuery at line 246
`string bibtex()`

#### Return Value

string |

#### Exceptions

UnsupportedOperationException |

###
in AbstractQuery at line 267
`string endnote()`

#### Return Value

string |

#### Exceptions

UnsupportedOperationException |