1
{
    "title": "Flipkart Affiliate API Directory",
    "description": "This directory contains links for Product Feed API and Delta Feed API of all categories with all the versions available",
    "apiGroups": {
        "affiliate": {
            "name": "affiliate",
            "apiListings": {
                "food_nutrition": {
                    "availableVariants": {
                        "v1.1.0": {
                            "resourceName": "food_nutrition",
                            "put": null,
                            "delete": null,
                            "post": null,
                            "get": "https://affiliate-api.flipkart.net/affiliate/1.0/feeds/keshav/category/7jv.json?expiresAt=1504895695325&sig=b25c6a83d531ef40377203de9ea148d3",
                            "deltaGet": "https://affiliate-api.flipkart.net/affiliate/1.0/deltaFeeds/keshav/category/7jv.json?expiresAt=1504895695326&sig=c2cc339de1f7fabad8113d82428b837e",
                            "top": "https://affiliate-api.flipkart.net/affiliate/1.0/topFeeds/keshav/category/7jv.json?expiresAt=1504895695326&sig=d66f64ee728f1978bc9cfd3a87ca4df3"
                        },
                        "v0.1.0": {
                            "resourceName": "food_nutrition",
                            "put": null,
                            "delete": null,
                            "post": null,
                            "get": "https://affiliate-api.flipkart.net/affiliate/feeds/keshav/category/7jv.json?expiresAt=1504895695326&sig=8dd00a35f90d53e44b544a20b5215898",
                            "deltaGet": "https://affiliate-api.flipkart.net/affiliate/deltaFeeds/keshav/category/7jv.json?expiresAt=1504895695326&sig=8dd00a35f90d53e44b544a20b5215898",
                            "top": null
                        }
                    },
                    "apiName": "food_nutrition"
                },
                "televisions": {
                    "availableVariants": {
                        "v1.1.0": {
                            "resourceName": "televisions",
                            "put": null,
                            "delete": null,
                            "post": null,
                            "get": "https://affiliate-api.flipkart.net/affiliate/1.0/feeds/keshav/category/ckf-czl.json?expiresAt=1504895695324&sig=8ddac7793632a7bba2923c414e89dc1e",
                            "deltaGet": "https://affiliate-api.flipkart.net/affiliate/1.0/deltaFeeds/keshav/category/ckf-czl.json?expiresAt=1504895695324&sig=8ddac7793632a7bba2923c414e89dc1e",
                            "top": "https://affiliate-api.flipkart.net/affiliate/1.0/topFeeds/keshav/category/ckf-czl.json?expiresAt=1504895695324&sig=56301eee9cc9c5d9504432868eeb97f3"
                        },
                        "v0.1.0": {
                            "resourceName": "televisions",
                            "put": null,
                            "delete": null,
                            "post": null,
                            "get": "https://affiliate-api.flipkart.net/affiliate/feeds/keshav/category/ckf-czl.json?expiresAt=1504895695324&sig=cea0487d37d2c906a698b73a7448950a",
                            "deltaGet": "https://affiliate-api.flipkart.net/affiliate/deltaFeeds/keshav/category/ckf-czl.json?expiresAt=1504895695324&sig=cea0487d37d2c906a698b73a7448950a",
                            "top": null
                        }
                    },
                    "apiName": "televisions"
                },




 }
        }
    }
}
String data = response.body().getAffiliate().getApiListings().getFoodNutrition().getAvailableVariants().getV110().getResourceName(); 

I am trying get List of resourceName and get for each ApiListings

I have all Model class but I don't know how I will get all resource name in one List and "get" in another value.

halfer
  • 19,824
  • 17
  • 99
  • 186
TrueCall
  • 11
  • 2
  • 3
    Please read [Under what circumstances may I add “urgent” or other similar phrases to my question, in order to obtain faster answers?](//meta.stackoverflow.com/q/326569) - the summary is that this is not an ideal way to address volunteers, and is probably counterproductive to obtaining answers. Please refrain from adding this to your questions. – halfer Sep 08 '17 at 10:39
  • Please help me in this Question – TrueCall Sep 08 '17 at 10:40
  • Are you sure this is the response that you are getting?? – debugger Sep 08 '17 at 10:41
  • @TrueCall you should be adding one more node like getApiGroups() from which you can call getAffiliate() – Navneet Krishna Sep 08 '17 at 10:43
  • @TrueCall...You can add GsonConvertor to reftrofit no? – Sharath kumar Sep 08 '17 at 10:45

1 Answers1

0

Try this

i have done this using parsing JSON object and JSON array ,take help from this,

Community
  • 1
  • 1
Sunil
  • 3,785
  • 1
  • 32
  • 43
  • i did every thing Fk-Affiliate-Id:affliatek Fk-Affiliate-Token:98ccd7d7aa0c4b59a3f831d1db50f24e this two thing i have to pass in header get method @GET("api/keshav.json") Call getTopRatedProduct(@Header("Fk-Affiliate-Id") String AffiliateID, @Header("Fk-Affiliate-Token") String token); please chekc is it correct – TrueCall Sep 08 '17 at 10:46
  • response is not coming – TrueCall Sep 08 '17 at 10:47
  • See you have this response you only have to do is just get the parameter from this response ,is this you want? – Sunil Sep 08 '17 at 10:49
  • I was doing the same way that you are doing i got more confusions and errors so by calling "ApiGroups" in your call method,i simply pass the object and this object will give the JSON response and in JSON response you can parse your data very easily.Try to pass my objects which i have passed in my example. – Sunil Sep 08 '17 at 10:53
  • can u tell me how to send two Header parameter in getMethod in retrofit – TrueCall Sep 08 '17 at 11:01
  • before this i have same problem using volley but i dont know how to do in retrofit . In volley i have send this one by one – Sunil Sep 08 '17 at 11:04