如何使用凌空库在Android Studio中针对国家和城市加载国家/地区?

时间:2019-07-11 06:55:17

标签: android android-volley android-spinner

获取国家/地区的方法:

{
  "Id": 0,
  "Code": 0,
  "Status": "SUCCESS",
  "IsSuccess": true,
  "Message": "Country Get successfully...",
  "ReturnStatus": false,
  "ReturnMessage": null,
  "Content": [
    {
      "Id": 1,
      "CityName": "India"
    },
    {
      "Id": 2,
      "CityName": "Bangladesh"
    }
]
}
显示状态的

post方法:

jsonObject.put("CountryId" : 1)
{
  "Id": 0,
  "Code": 0,
  "Status": "SUCCESS",
  "IsSuccess": true,
  "Message": "State List Get successfully...",
  "ReturnStatus": false,
  "ReturnMessage": null,
  "Content": [
    {
      "StateName": "Maharastra",
      "CountryId": 1
    },
    {
      "StateName": "Paras Paras",
      "CountryId": 1
    }
  ]
}

显示城市的发布方法:

jsonObject.put("StateId" : 1)
{
  "Id": 0,
  "Code": 0,
  "Status": "SUCCESS",
  "IsSuccess": true,
  "Message": "City List Get successfully...",
  "ReturnStatus": false,
  "ReturnMessage": null,
  "Content": [
    {
      "CityName": "Maharastra",
      "CityId": 1
    },
    {
      "CityName": "Paras Paras",
      "CityId": 1
    }
  ]
}

0 个答案:

没有答案