All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.avarabyeu.jashing.integration.stackoverflow.StackExchangeClient Maven / Gradle / Ivy

package com.github.avarabyeu.jashing.integration.stackoverflow;

import com.github.avarabyeu.jashing.integration.stackoverflow.model.Question;
import com.github.avarabyeu.jashing.integration.stackoverflow.model.StackExchangeResponse;
import com.github.avarabyeu.restendpoint.http.HttpMethod;
import com.github.avarabyeu.restendpoint.http.annotation.Path;
import com.github.avarabyeu.restendpoint.http.annotation.Query;
import com.github.avarabyeu.restendpoint.http.annotation.Request;

import java.util.Map;

/**
 * @author Andrei Varabyeu
 */
public interface StackExchangeClient {

    /**
     * Obtains all questions marked with tag
     *
     * @param filter Query filter
     */
    @Request(method = HttpMethod.GET, url = "/questions")
    StackExchangeResponse getQuestions(@Query Map filter);

    /**
     * Obtains all questions marked with tag
     */
    @Request(method = HttpMethod.GET, url = "/questions?tagged={tag}&filter=default&site=stackoverflow")
    StackExchangeResponse getTaggedQuestions(@Path("tag") String tag);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy