<commit_before>package im.chic.weixin.utils;

import retrofit.Callback;
import retrofit.http.Body;
import retrofit.http.GET;
import retrofit.http.POST;
import retrofit.http.Query;

import java.util.ArrayList;

/**
 * @author huahang
 */
public interface WeixinAPI {
    public static class Token {
        public Long errcode;
        public String errmsg;
        public String access_token;
        public Long expires_in;
    }

    @GET("/cgi-bin/token")
    Token getToken(
            @Query("grant_type") String grantType,
            @Query("appid") String appID,
            @Query("secret") String secret
    );

    public static class Ticket {
        public Long errcode;
        public String errmsg;
        public String ticket;
        public Long expires_in;
    }

    @GET("/cgi-bin/ticket/getticket")
    Ticket getTicket(
            @Query("access_token") String accessToken,
            @Query("type") String type
    );

    public static class AuthorizeDeviceRequest {
        public static class Device {
            public String id = "";
            public String mac = "";
            public String connect_protocol = "4";
            public String auth_key = "";
            public int close_strategy = 1;
            public int conn_strategy = 1;
            public int crypt_method = 0;
            public int auth_ver = 0;
            public int manu_mac_pos = -1;
            public int ser_mac_pos = -2;
        }
        public int device_num = 0;
        public ArrayList<Device> device_list = new ArrayList<Device>();
        public int op_type = 0;
    }

    public static class AuthorizeDeviceResponse {
        public static class Item {
            public static class BaseInfo {
                public String device_type = "";
                public String device_id = "";
            }
            public int errcode = 0;
            public String errmsg = "ok";
            public BaseInfo base_info = new BaseInfo();
        }
        public int errcode = 0;
        public String errmsg = "ok";
        public ArrayList<Item> resp = new ArrayList<Item>();
    }

    @POST("/device/authorize_device")
    void authorizeDevice(
            @Query("access_token") String accessToken,
            @Body AuthorizeDeviceRequest request,
            Callback<AuthorizeDeviceResponse> callback
    );

    public static class CreateQRCodeRequest {
        public int device_num = 0;
        public ArrayList<String> device_id_list = new ArrayList<String>();
    }

    public static class CreateQRCodeResponse {
        public static class Item {
            public String device_id = "";
            public String ticket = "";
        }
        public int errcode = 0;
        public String errmsg = "ok";
        public int device_num = 0;
        public ArrayList<Item> code_list = new ArrayList<Item>();
    }

    @POST("/device/create_qrcode")
    void createQRCode(
            @Query("access_token") String accessToken,
            @Body CreateQRCodeRequest request,
            Callback<CreateQRCodeResponse> callback
    );
}<commit_msg>minor interface change<commit_after>package im.chic.weixin.utils;

import retrofit.Callback;
import retrofit.http.Body;
import retrofit.http.GET;
import retrofit.http.POST;
import retrofit.http.Query;

import java.util.ArrayList;

/**
 * @author huahang
 */
public interface WeixinAPI {
    public static class Token {
        public Long errcode;
        public String errmsg;
        public String access_token;
        public Long expires_in;
    }

    @GET("/cgi-bin/token")
    public Token getToken(
            @Query("grant_type") String grantType,
            @Query("appid") String appID,
            @Query("secret") String secret
    );

    public static class Ticket {
        public Long errcode;
        public String errmsg;
        public String ticket;
        public Long expires_in;
    }

    @GET("/cgi-bin/ticket/getticket")
    public Ticket getTicket(
            @Query("access_token") String accessToken,
            @Query("type") String type
    );

    public static class AuthorizeDeviceRequest {
        public static class Device {
            public String id = "";
            public String mac = "";
            public String connect_protocol = "4";
            public String auth_key = "";
            public int close_strategy = 1;
            public int conn_strategy = 1;
            public int crypt_method = 0;
            public int auth_ver = 0;
            public int manu_mac_pos = -1;
            public int ser_mac_pos = -2;
        }
        public int device_num = 0;
        public ArrayList<Device> device_list = new ArrayList<Device>();
        public int op_type = 0;
    }

    public static class AuthorizeDeviceResponse {
        public static class Item {
            public static class BaseInfo {
                public String device_type = "";
                public String device_id = "";
            }
            public int errcode = 0;
            public String errmsg = "ok";
            public BaseInfo base_info = new BaseInfo();
        }
        public int errcode = 0;
        public String errmsg = "ok";
        public ArrayList<Item> resp = new ArrayList<Item>();
    }

    @POST("/device/authorize_device")
    public void authorizeDevice(
            @Query("access_token") String accessToken,
            @Body AuthorizeDeviceRequest request,
            Callback<AuthorizeDeviceResponse> callback
    );

    public static class CreateQRCodeRequest {
        public int device_num = 0;
        public ArrayList<String> device_id_list = new ArrayList<String>();
    }

    public static class CreateQRCodeResponse {
        public static class Item {
            public String device_id = "";
            public String ticket = "";
        }
        public int errcode = 0;
        public String errmsg = "ok";
        public int device_num = 0;
        public ArrayList<Item> code_list = new ArrayList<Item>();
    }

    @POST("/device/create_qrcode")
    public void createQRCode(
            @Query("access_token") String accessToken,
            @Body CreateQRCodeRequest request,
            Callback<CreateQRCodeResponse> callback
    );


}
{'fraction_non_alphanumeric': 0.08364162779475631, 'fraction_numerical': 0.0045037799581791865, 'mean_word_length': 2.0376160234489498, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6540139', 'n_tokens_mistral': 1664, 'n_tokens_neox': 1582, 'n_words': 486}