gerbenjacobs / HabboAPI

A PHP wrapper for the (undocumented) Habbo API
MIT License
45 stars 10 forks source link

Habbo Mall API #31

Closed DavydeVries closed 6 years ago

DavydeVries commented 8 years ago

Suggestion:

With the information below, my suggestion to create an parser for the endpoint Habbo Mall. With the data per country you can calculate the average price for one credit. This information can be used by furni information. If you know that a rubber duck cost 1 credit you can also show the real value in currency. 1 credit is like ($0.10, £0.07, €0,09) With this endpoint supported you can also show the latest deals in habbo like BUNDLE.

Technical information:

https://www.habbo.com/shopapi/public/countries https://www.habbo.de/shopapi/public/countries https://www.habbo.fr/shopapi/public/countries https://www.habbo.fi/shopapi/public/countries https://www.habbo.it/shopapi/public/countries https://www.habbo.com.tr/shopapi/public/countries https://www.habbo.nl/shopapi/public/countries https://www.habbo.es/shopapi/public/countries https://www.habbo.com.br/shopapi/public/countries Give some results like this:

[{
    "id": 5103,
    "name": "Australia",
    "locale": null,
    "countryCode": "au"
}, {
    "id": 5115,
    "name": "Brazil",
    "locale": null,
    "countryCode": "br"
}, ...]

With the results above you can get: (strict by hotel domain extension!!!) https://www.habbo.com/shopapi/public/inventory/au https://www.habbo.com/shopapi/public/inventory/br https://www.habbo.com/shopapi/public/inventory/ca https://www.habbo.com/shopapi/public/inventory/hk and https://www.habbo.nl/shopapi/public/inventory/nl https://www.habbo.nl/shopapi/public/inventory/be ect.. Will give you results like this:

{
    "country": {
        "id": 5115,
        "name": "Brazil",
        "locale": null,
        "countryCode": "br"
    },
    "paymentCategories": ["online"],
    "pricePoints": [{
        "id": 9594,
        "name": "6-months Habbo Club",
        "description": "Enjoy a whopping 6 MONTHS of HC membership exclusives with this offer! Still have some days left on your membership? The new days will just be added on top - you'll never pay double.",
        "creditAmount": 0,
        "price": "R$ 30,00",
        "iconId": 5,
        "categories": ["HABBO_CLUB"],
        "countryCode": "br",
        "paymentMethods": [{
            "id": 19149,
            "name": "Paymentez BR direct",
            "smallPrint": null,
            "buttonText": null,
            "category": "online",
            "buttonLogoUrl": "//habboo-a.akamaihd.net/c_images/cbs2_partner_logos/logoPaymentez_final_2_0_white.png",
            "localizationKey": "paymentez_br_direct",
            "disclaimerRequired": false,
            "premiumSms": false,
            "requestPath": "online",
            "purchaseParams": {
                "countryId": 5115,
                "pricePointId": 9594,
                "paymentMethodId": 19149
            }
        }]
    }, {
        "id": 9615,
        "name": "1-year Habbo Club",
        "description": "An immense 1 YEAR of HC membership exclusives! Still have some days left on your membership? The new days will just be added on top - you'll never pay double.",
        "creditAmount": 0,
        "price": "R$ 54,00",
        "iconId": 5,
        "categories": ["HABBO_CLUB"],
        "countryCode": "br",
        "paymentMethods": [{
            "id": 19149,
            "name": "Paymentez BR direct",
            "smallPrint": null,
            "buttonText": null,
            "category": "online",
            "buttonLogoUrl": "//habboo-a.akamaihd.net/c_images/cbs2_partner_logos/logoPaymentez_final_2_0_white.png",
            "localizationKey": "paymentez_br_direct",
            "disclaimerRequired": false,
            "premiumSms": false,
            "requestPath": "online",
            "purchaseParams": {
                "countryId": 5115,
                "pricePointId": 9615,
                "paymentMethodId": 19149
            }
        }]
    }, {
        "id": 9480,
        "creditAmount": 55,
        "price": "R$ 16,00",
        "iconId": 7,
        "categories": ["CREDITS"],
        "countryCode": "br",
        "paymentMethods": [{
            "id": 19149,
            "name": "Paymentez BR direct",
            "smallPrint": null,
            "buttonText": null,
            "category": "online",
            "buttonLogoUrl": "//habboo-a.akamaihd.net/c_images/cbs2_partner_logos/logoPaymentez_final_2_0_white.png",
            "localizationKey": "paymentez_br_direct",
            "disclaimerRequired": false,
            "premiumSms": false,
            "requestPath": "online",
            "purchaseParams": {
                "countryId": 5115,
                "pricePointId": 9480,
                "paymentMethodId": 19149
            }
        }],
        "doubleCredits": false
    }, {
        "id": 9481,
        "creditAmount": 110,
        "price": "R$ 30,00",
        "iconId": 7,
        "categories": ["CREDITS"],
        "countryCode": "br",
        "paymentMethods": [{
            "id": 19149,
            "name": "Paymentez BR direct",
            "smallPrint": null,
            "buttonText": null,
            "category": "online",
            "buttonLogoUrl": "//habboo-a.akamaihd.net/c_images/cbs2_partner_logos/logoPaymentez_final_2_0_white.png",
            "localizationKey": "paymentez_br_direct",
            "disclaimerRequired": false,
            "premiumSms": false,
            "requestPath": "online",
            "purchaseParams": {
                "countryId": 5115,
                "pricePointId": 9481,
                "paymentMethodId": 19149
            }
        }],
        "doubleCredits": false
    }, {
        "id": 9482,
        "creditAmount": 225,
        "price": "R$ 60,00",
        "iconId": 7,
        "categories": ["CREDITS"],
        "countryCode": "br",
        "paymentMethods": [{
            "id": 19149,
            "name": "Paymentez BR direct",
            "smallPrint": null,
            "buttonText": null,
            "category": "online",
            "buttonLogoUrl": "//habboo-a.akamaihd.net/c_images/cbs2_partner_logos/logoPaymentez_final_2_0_white.png",
            "localizationKey": "paymentez_br_direct",
            "disclaimerRequired": false,
            "premiumSms": false,
            "requestPath": "online",
            "purchaseParams": {
                "countryId": 5115,
                "pricePointId": 9482,
                "paymentMethodId": 19149
            }
        }],
        "doubleCredits": false
    }, {
        "id": 9483,
        "creditAmount": 590,
        "price": "R$ 150,00",
        "iconId": 7,
        "categories": ["CREDITS"],
        "countryCode": "br",
        "paymentMethods": [{
            "id": 19149,
            "name": "Paymentez BR direct",
            "smallPrint": null,
            "buttonText": null,
            "category": "online",
            "buttonLogoUrl": "//habboo-a.akamaihd.net/c_images/cbs2_partner_logos/logoPaymentez_final_2_0_white.png",
            "localizationKey": "paymentez_br_direct",
            "disclaimerRequired": false,
            "premiumSms": false,
            "requestPath": "online",
            "purchaseParams": {
                "countryId": 5115,
                "pricePointId": 9483,
                "paymentMethodId": 19149
            }
        }],
        "doubleCredits": false
    }],
    "doubleCredits": false
}

You have different categories in the Habbo Mall: These categories can be combined with other categories like HABBO_CLUB + BUILDERS_CLUB.

gerbenjacobs commented 7 years ago

This can become quite interesting when it's a bundle, it then also contains all the items as subProducts

{
    "id": 9781,
    "subProducts": [{
        "imgUrl": "//habboo-a.akamaihd.net/dcr/hof_furni/62625/hween_c16_floor_icon.png",
        "count": "13"
    }, {
        "imgUrl": "//habboo-a.akamaihd.net/dcr/hof_furni/54892/hween14_floor_icon.png",
        "count": "7"
    }, {
        "imgUrl": "//habboo-a.akamaihd.net/dcr/hof_furni/56746/sb_wall_icon.png",
        "count": "5"
    }, {
        "imgUrl": "//habboo-a.akamaihd.net/dcr/hof_furni/62625/hween_c16_balcony_icon.png",
        "count": "3"
    }, {
        "imgUrl": "//habboo-a.akamaihd.net/dcr/hof_furni/54764/hween09_curt_icon.png",
        "count": "2"
    }, {
        "imgUrl": "//habboo-a.akamaihd.net/dcr/hof_furni/62625/hween_c16_bkcase_icon.png",
        "count": "2"
    }, {
        "imgUrl": "//habboo-a.akamaihd.net/dcr/hof_furni/62625/hween_c16_glasstable_icon.png",
        "count": "2"
    }, {
        "imgUrl": "//habboo-a.akamaihd.net/dcr/hof_furni/62625/hween_c16_vase_icon.png",
        "count": "2"
    }, {
        "imgUrl": "//habboo-a.akamaihd.net/dcr/hof_furni/62625/hween_c16_webs_icon.png",
        "count": "2"
    }, {
        "imgUrl": "//habboo-a.akamaihd.net/dcr/hof_furni/56783/poster43_icon.png",
        "count": "2"
    }, {
        "imgUrl": "//habboo-a.akamaihd.net/dcr/hof_furni/50950/wf_act_match_to_sshot_icon.png",
        "count": "2"
    }, {
        "imgUrl": "//habboo-a.akamaihd.net/dcr/hof_furni/58624/army_c15_deskitem_icon.png",
        "count": "1"
    }, {
        "imgUrl": "//habboo-a.akamaihd.net/dcr/hof_furni/58624/army_c15_plant_icon.png",
        "count": "1"
    }, {
        "imgUrl": "//habboo-a.akamaihd.net/dcr/hof_furni/56913/attic15_lamp_icon.png",
        "count": "1"
    }, {
        "imgUrl": "//habboo-a.akamaihd.net/dcr/hof_furni/56913/attic15_table_icon.png",
        "count": "1"
    }, {
        "imgUrl": "//habboo-a.akamaihd.net/dcr/hof_furni/45508/desk_junk_icon.png",
        "count": "1"
    }, {
        "imgUrl": "//habboo-a.akamaihd.net/dcr/hof_furni/59632/exe_c15_telephone_icon.png",
        "count": "1"
    }, {
        "imgUrl": "//habboo-a.akamaihd.net/dcr/hof_furni/56746/exe_copier_icon.png",
        "count": "1"
    }, {
        "imgUrl": "//habboo-a.akamaihd.net/dcr/hof_furni/56746/gothic_desk_icon.png",
        "count": "1"
    }, {
        "imgUrl": "//habboo-a.akamaihd.net/dcr/hof_furni/54764/habboween_crypt_icon.png",
        "count": "1"
    }, {
        "imgUrl": "//habboo-a.akamaihd.net/dcr/hof_furni/54764/hween09_hatch_icon.png",
        "count": "1"
    }, {
        "imgUrl": "//habboo-a.akamaihd.net/dcr/hof_furni/54764/hween09_tv_icon.png",
        "count": "1"
    }, {
        "imgUrl": "//habboo-a.akamaihd.net/dcr/hof_furni/54764/hween13_bldtrail_icon.png",
        "count": "1"
    }, {
        "imgUrl": "//habboo-a.akamaihd.net/dcr/hof_furni/54940/hween14_candletrail_icon.png",
        "count": "1"
    }, {
        "imgUrl": "//habboo-a.akamaihd.net/dcr/hof_furni/60192/hween_c15_shinycarpet_icon.png",
        "count": "1"
    }, {
        "imgUrl": "//habboo-a.akamaihd.net/dcr/hof_furni/62625/hween_c16_bust_icon.png",
        "count": "1"
    }, {
        "imgUrl": "//habboo-a.akamaihd.net/dcr/hof_furni/56746/pirate_cannonballs_icon.png",
        "count": "1"
    }, {
        "imgUrl": "//habboo-a.akamaihd.net/dcr/hof_furni/57409/pwad_icon.png",
        "count": "1"
    }, {
        "imgUrl": "//habboo-a.akamaihd.net/dcr/hof_furni/56746/sb_cans_icon.png",
        "count": "1"
    }, {
        "imgUrl": "//habboo-a.akamaihd.net/dcr/hof_furni/59445/stories_sch_chair_icon.png",
        "count": "1"
    }, {
        "imgUrl": "//habboo-a.akamaihd.net/dcr/hof_furni/56746/torch_icon.png",
        "count": "1"
    }, {
        "imgUrl": "//habboo-a.akamaihd.net/dcr/hof_furni/57409/trapkeep_icon.png",
        "count": "1"
    }, {
        "imgUrl": "//habboo-a.akamaihd.net/dcr/hof_furni/56737/uni_laptop_icon.png",
        "count": "1"
    }, {
        "imgUrl": "//habboo-a.akamaihd.net/dcr/hof_furni/56746/uni_trashcan_icon.png",
        "count": "1"
    }, {
        "imgUrl": "//habboo-a.akamaihd.net/dcr/hof_furni/50950/wf_trg_walks_on_furni_icon.png",
        "count": "1"
    }],
    "name": "Evil Frank's Office Bundle",
    "description": "Containing an EXCLUSIVE Evil Frank Bust and cool new and old Habboween furni! Made by Jenneben",
    "creditAmount": 0,
    "price": "AU$ 7.00",
    "iconId": 4,
    "categories": ["BUNDLE"],
    "countryCode": "au",
    "paymentMethods": [{
        "id": 19158,
        "name": "Paysafe Card AU (new)",
        "smallPrint": null,
        "buttonText": null,
        "category": "online",
        "buttonLogoUrl": "//habboo-a.akamaihd.net/c_images/cbs2_partner_logos/partner_logo_paysafe.png",
        "localizationKey": "paysafecard_au",
        "disclaimerRequired": false,
        "premiumSms": false,
        "requestPath": "online",
        "purchaseParams": {
            "countryId": 5103,
            "pricePointId": 9781,
            "paymentMethodId": 19158
        }
    }, {
        "id": 19184,
        "name": "Adyen AU 3D",
        "smallPrint": null,
        "buttonText": null,
        "category": "online",
        "buttonLogoUrl": "//habboo-a.akamaihd.net/c_images/cbs2_partner_logos/partner_logo_credit_card_005.png",
        "localizationKey": "adyen_au_3d",
        "disclaimerRequired": false,
        "premiumSms": false,
        "requestPath": "online",
        "purchaseParams": {
            "countryId": 5103,
            "pricePointId": 9781,
            "paymentMethodId": 19184
        }
    }, {
        "id": 19182,
        "name": "Paypal AU (Adyen)",
        "smallPrint": null,
        "buttonText": null,
        "category": "online",
        "buttonLogoUrl": "//habboo-a.akamaihd.net/c_images/cbs2_partner_logos/partner_logo_paypal_001.png",
        "localizationKey": "adyen_pp_au",
        "disclaimerRequired": false,
        "premiumSms": false,
        "requestPath": "online",
        "purchaseParams": {
            "countryId": 5103,
            "pricePointId": 9781,
            "paymentMethodId": 19182
        }
    }, {
        "id": 19165,
        "name": "SMS",
        "smallPrint": "Supported operators: <B>Vodafone, Orange, T-Mobile, O2, Three, Tesco Mobile</B> <BR/> <BR/>\nStandard text message fee will also be charged depending on operator and mobile phone plan. You will be charged for this purchase on your next phone bill. If you are on a prepaid balance, the sum will be subtracted from your balance immediately. The quoted price is charged for each SMS that is requested.  <BR/> <BR/> \nThere is <A HREF=\"https://help.habbo.com/entries/347508-What-are-the-spending-limits-on-Habbo-\" TARGET=\"_blank\"> spending limit information</A> available on our Help pages. <BR/> <BR/> \nSMS payment service provided by Boku. If you need assistance with mobile purchases, please contact Boku customer service: <a href=\"mailto:support@boku.com\">support@boku.com</a>. <BR/> <BR/>",
        "buttonText": null,
        "category": "mobile",
        "buttonLogoUrl": null,
        "localizationKey": "boku_au",
        "disclaimerRequired": true,
        "premiumSms": false,
        "requestPath": "online",
        "purchaseParams": {
            "countryId": 5103,
            "pricePointId": 9781,
            "paymentMethodId": 19165
        }
    }]
}
DavydeVries commented 7 years ago

Old news.

But based on furnidata swf name and furni id. You can guess the image urls.

//habboo-a.akamaihd.net/dcr/hoffurni/furni id/`swf name replace * with `.png

gerbenjacobs commented 6 years ago

Although the endpoint is interesting, I don't think it fits with the HabboAPI and as such I'm closing this issue.