package com.alibaba.akita.taobao;

import com.alibaba.akita.annotation.AkAPI;
import com.alibaba.akita.annotation.AkGET;
import com.alibaba.akita.annotation.AkParam;
import com.alibaba.akita.annotation.AkSignature;
import com.alibaba.akita.exception.AkInvokeException;
import com.alibaba.akita.exception.AkServerStatusException;

import java.util.Map;

/**
 * Created with IntelliJ IDEA.
 * User: justinyang
 * Date: 13-2-17
 * Time: PM3:32
 *
 * eg.
 * http://gw.api.taobao.com/router/rest?sign=719E9C5DCF2E1423702EC66822DE22E4
 * &timestamp=2013-02-17+15%3A44%3A42
 * &v=2.0
 * &app_key=12129701
 * &method=taobao.item.get
 * &partner_id=top-apitools
 * &format=json
 * &num_iid=16788418057
 * &fields=detail_url,num_iid,title
 *
 */
public interface TopAPI {
    @AkGET
    @AkSignature(using = TopAPISignature.class)
    @AkAPI(url="http://gw.api.taobao.com/router/rest")
    String top_online(
            @AkParam(value = "timestamp", encode = "utf8") String timestamp,
            @AkParam("v") String v,
            @AkParam("app_key") String app_key,
            @AkParam("app_secret") String app_secret,
            @AkParam("method") String method,
            @AkParam("session") String session,
            @AkParam("partner_id") String partner_id,
            @AkParam("format") String format,
            @AkParam("sign_method") String sign_method,
            @AkParam(value = "$paramMap", encode = "utf8") Map<String, String> appLayerData
    ) throws AkInvokeException, AkServerStatusException;
}

@@ -68,150 +68,9 @@
 ion.
-AkAPI;%0Aimport com.alibaba.akita.annotation.AkGET;%0Aimport com.alibaba.akita.annotation.AkParam;%0Aimport com.alibaba.akita.annotation.AkSignature
+*
 ;%0Aim
@@ -614,16 +614,19 @@
 opAPI %7B%0A
+%0A//
     @AkG
@@ -628,16 +628,798 @@
  @AkGET%0A
+//    @AkSignature(using = TopAPISignature.class)%0A//    @AkAPI(url=%22http://gw.api.taobao.com/router/rest%22)%0A//    String top_online(%0A//            @AkParam(value = %22timestamp%22, encode = %22utf8%22) String timestamp,%0A//            @AkParam(%22v%22) String v,%0A//            @AkParam(%22app_key%22) String app_key,%0A//            @AkParam(%22app_secret%22) String app_secret,%0A//            @AkParam(%22method%22) String method,%0A//            @AkParam(%22session%22) String session,%0A//            @AkParam(%22partner_id%22) String partner_id,%0A//            @AkParam(%22format%22) String format,%0A//            @AkParam(%22sign_method%22) String sign_method,%0A//            @AkParam(value = %22$paramMap%22, encode = %22utf8%22) Map%3CString, String%3E appLayerData%0A//    ) throws AkInvokeException, AkServerStatusException;%0A%0A%0A    @AkPOST%0A
     @AkS
@@ -1576,33 +1576,16 @@
 mestamp%22
-, encode = %22utf8%22
 ) String
@@ -1976,32 +1976,32 @@
 ng sign_method,%0A
+
             @AkP
@@ -2024,33 +2024,16 @@
 aramMap%22
-, encode = %22utf8%22
 ) Map%3CSt

modify topapi interface Get->Post