// Contents makes a GET request to return the Ponzu Content API response for the
// enpoint: `/api/contents?type=<Type>` with query options:
// Count <int>
// Offset <int>
// Order <string>
Contents makes a GET request to return the Ponzu Content API response for the
enpoint: `/api/contents?type=` with query options:
Count 
Offset 
Order 
// Contents makes a GET request to return the Ponzu Content API response for the // enpoint : ` / api / contents?type = <Type > ` with query options : // Count <int > // Offset <int > // Order <string >
func (c *Client) Contents(contentType string, opts *QueryOptions) (*APIResponse, error) {
	opts = setDefaultOpts(opts)
	endpoint := fmt.Sprintf(
		"%s/api/contents?type=%s&count=%d&offest=%d&order=%s",
		c.Conf.Host, contentType, opts.Count, opts.Offset, opts.Order,
	)
	if c.CacheEnabled() {
		ok, resp := c.Cache.Check(endpoint)
		if ok {
			return resp, nil
		}
	}
	req, err := http.NewRequest(http.MethodGet, endpoint, nil)
	if err != nil {
		return nil, err
	}
	req = mergeHeader(req, c.Conf.Header)
	w, err := c.Do(req)
	if err != nil {
		return nil, err
	}
	resp := &APIResponse{
		Response: w,
	}
	err = resp.process()
	if err != nil {
		return resp, err
	}
	if c.CacheEnabled() {
		err := c.Cache.Add(endpoint, resp)
		return resp, err
	}
	return resp, nil
}
func ( c * Client ) Contents ( contentType string , opts * QueryOptions ) ( * APIResponse , error ) { opts = setDefaultOpts ( opts ) endpoint := fmt . Sprintf ( " " , c . Conf . Host , contentType , opts . Count , opts . Offset , opts . Order , ) if c . CacheEnabled ( ) { ok , resp := c . Cache . Check ( endpoint ) if ok { return resp , nil } } req , err := http . NewRequest ( http . MethodGet , endpoint , nil ) if err != nil { return nil , err } req = mergeHeader ( req , c . Conf . Header ) w , err := c . Do ( req ) if err != nil { return nil , err } resp := & APIResponse { Response : w , } err = resp . process ( ) if err != nil { return resp , err } if c . CacheEnabled ( ) { err := c . Cache . Add ( endpoint , resp ) return resp , err } return resp , nil }
Contents makes a GET request to return the Ponzu Content API response for the
enpoint: `/api/contents?type=` with query options:
Count
Offset
Order
Contents makes a GET request to return the Ponzu Content API response for the enpoint : ` / api / contents?type = ` with query options : Count Offset Order