2014-12-15 5 views
2

Google 클라이언트 라이브러리를 사용하여 Google apps 도메인의 모든 조직 단위를 검색하는 방법은 무엇입니까? Google 클라이언트 라이브러리에서 OrgUnits를 다시 검색하는 데 사용해야하는 기능은 무엇입니까? orgunits.list :Google 클라이언트 라이브러리를 사용하여 전체 또는 하위 조직 단위 검색

나는이 전용의 API 방법이 있습니다 gdata-python-client site

def create_service(): 
    f = file(API_DATA["SERVICE_PEM_PATH"], 'rb') 
    key = f.read() 
    f.close() 

    credentials = SignedJwtAssertionCredentials(API_DATA["SERVICE_EMAIL"], key, scope=API_DATA["DIRECTORY_SCOPES"], sub=API_DATA["ADMIN_EMAIL"]) 
    http = httplib2.Http() 
    http = credentials.authorize(http) 

    service = build("admin", "directory_v1", http=http) 
    return service 


directory = create_service() 

# directory.RetrieveAllOrganizationUsers() -- Function to retrieve Org Units ?? 

답변

3

에있는 모든 문서를 찾을 수 없습니다.

The reference documentation is here.

The Python library documentation is here.

나는 파이썬의 전문가가 아니지만, 나는 호출은 다음과 같이 예상 :에 의해

directory.orgunits().list(customerId='my_customer').execute() 

는이 정보를 찾을 수 없습니다 이유입니다, 이것은의 GData API를하지 않습니다이었다. GData는 Google이 점차적으로 사용하지 않는 API의 이전 형식 이름입니다.