gerbenjacobs / HabboAPI

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

Create APIs for Groups #28

Closed gerbenjacobs closed 8 years ago

gerbenjacobs commented 8 years ago

https://www.habbo.com/api/public/groups/g-hhus-fd92759bc932225f663f1521be8ce255

{
    "id": "g-hhus-fd92759bc932225f663f1521be8ce255",
    "name": "UK",
    "description": "",
    "type": "NORMAL",
    "roomId": "r-hhus-dcf2e2a74a39f64dc627c5ef32a1aa83",
    "badgeCode": "b22114s19107t50064e4bcf7c532fdcecc1467d2185d975783",
    "primaryColour": "ffd601",
    "secondaryColour": "ffffff"
}

https://www.habbo.com/api/public/groups/g-hhus-fd92759bc932225f663f1521be8ce255/members

[{
    "gender": "f",
    "motto": "",
    "habboFigure": "hr-9534-45.hd-600-1.ch-3013-92.lg-3216-1332.sh-3064-1332.cc-3008-92-1332.cp-3128-62",
    "memberSince": "2005-01-05T08:21:03.000+0000",
    "uniqueId": "hhus-3037442649c23d0ab7c9c059cbf91981",
    "name": "aiko05$",
    "isAdmin": false
}, {
    "gender": "m",
    "motto": "hello!",
    "habboFigure": "hr-125-45.hd-180-1.ch-255-82.lg-3023-88.sh-300-91",
    "memberSince": "2005-11-25T23:34:19.000+0000",
    "uniqueId": "hhus-0b2bde97bcf11e57e71f0fe9ad963574",
    "name": "Jyoko",
    "isAdmin": false
}, {
    "gender": "m",
    "motto": "I'm Anthony ƒ Add etc NEW ACCOUNT",
    "habboFigure": "hr-170-45.hd-190-1.ch-255-78.lg-275-82.sh-290-62.ha-1004-91",
    "memberSince": "2006-04-03T17:02:12.000+0000",
    "uniqueId": "hhus-62e9cb80440a5ac20fab88b452c94a42",
    "name": "Mirokujr",
    "isAdmin": false
}, {
    "gender": "m",
    "motto": "",
    "habboFigure": "hr-891-42.hd-180-1.ch-3109-72-62.lg-281-72.sh-906-72.ha-1003-64.ea-3169-100.fa-1201.cp-3120-62",
    "memberSince": "2006-05-21T20:32:58.000+0000",
    "uniqueId": "hhus-bb7b09144f28973e9f67a4870de45ec8",
    "name": "GPN$",
    "isAdmin": false
}]
...

I did find out that certains groups return error: maintenance, but maybe it's because they are too big and/or have the status of Unlimited.

DavydeVries commented 8 years ago

By accessing the following url: https://www.habbo.com/api/public/groups/g-hhus-fd92759bc932225f663f1521be8ce255/members You can't figure out who the owner of the group is 😕 That's a bummer...

EDIT: There is a way, but I'm not sure if this is reliable. You can request: (Group room) https://www.habbo.com/api/public/rooms/r-hhus-dcf2e2a74a39f64dc627c5ef32a1aa83/ You will get response:

{
    "id": "r-hhus-dcf2e2a74a39f64dc627c5ef32a1aa83",
    "name": "n e t u e",
    "description": "",
    "creationTime": "2012-07-15T04:53:33.000+0000",
    "habboGroupId": "g-hhus-fd92759bc932225f663f1521be8ce255",
    "maximumVisitors": 50,
    "tags": [],
    "showOwnerName": true,
    "ownerName": "Otus",
    "ownerUniqueId": "hhus-f07366967edabf57cf7901be1f77a155",
    "thumbnailUrl": "https://habbo-stories-content.s3.amazonaws.com/navigator-thumbnail/hhus/58587009.png",
    "imageUrl": "https://habbo-stories-content.s3.amazonaws.com/fullroom-photo/hhus/58587009.png",
    "rating": 409,
    "categories": ["navigator.flatcategory.global.FANSITE"]
}

Otus have the status isAdmin:true and he is room owner, possibly he is the owner of the group?

gerbenjacobs commented 8 years ago

Yeah, nice idea. I'm not sure if we should add that to our (basic) group functionality, but a good way to find this out indeed.

Alynva commented 6 years ago

It's only here or the url "/members" is off? I never get the "error: maintenance", I get "Cannot GET /api/public/groups/{id}/members"

gerbenjacobs commented 6 years ago

It looks like they disabled /members completely..