package com.armstrongconsulting.acprotasks.client;

import com.armstrongconsulting.acprotasks.client.model.Items;

import feign.Headers;
import feign.Param;
import feign.RequestLine;

@Headers("Accept: application/json")
public interface AcproClient
{
    @RequestLine("GET /api_key?user={user}&password={password}&expires_after_seconds={expires_after_seconds}")
    String getApiKey(@Param("user") String user, @Param("password") String password,
        @Param("expires_after_seconds") Integer timeToLive);

    @RequestLine("GET /items?q=title:{title}&start={offset}&count={limit}&api_key={apiKey}")
    Items getItems(@Param("title") String titleContains, @Param("offset") Integer offset,
        @Param("limit") Integer limit, @Param("apiKey") String apiKey);
}
