Skip to content

Commit

Permalink
Update groups.py
Browse files Browse the repository at this point in the history
iranathan authored Apr 18, 2019
1 parent 5c6c0c3 commit 676bff1
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions pyblox/api/groups.py
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
# Copyright © 2017 Sanjay-B(Sanjay Bhadra). All rights reserved.
#

from .http import Http
from req import Http
from bs4 import *
import html5lib
import urllib.request
@@ -41,11 +41,30 @@ def getGroup(groupid):
# GET /groups/{groupId}/allies
# Returns Table/Array with each ally's attributes
def getGroupAllies(groupid):
a = Http.sendRequest("https://api.roblox.com/groups/" + str(groupid) + "allies")
a = Http.sendRequest("https://api.roblox.com/groups/" + str(groupid) + "/allies")
return a

# GET /groups/{groupId}/enemies
# Returns Table/Array with each enemy's attributes
def getGroupEnemies(groupid):
a = Http.sendRequest("https://api.roblox.com/groups/" + str(groupid) + "enemies")
a = Http.sendRequest("https://api.roblox.com/groups/" + str(groupid) + "/enemies")
return a

# GET /groups/{groupId}/roles
# Returns a Table/Array with each role.
def getGroupRoles(groupid):
a = Http.sendRequest("https://groups.roblox.com/v1/groups/" + str(groupid) + "/roles")
return a

# GET /Game/LuaWebService/HandleSocialRequest.ashx
# Returns String with role name.
def getUserRole(groupid, userid):
a = Http.sendRequest(f"https://www.roblox.com/Game/LuaWebService/HandleSocialRequest.ashx?method=GetGroupRole&playerid={userid}&groupId={groupid}")
return a







0 comments on commit 676bff1

Please sign in to comment.