Пример #1
0
 def GetAllCalendarResources(self):
     if self.oauth2token is not None:
         client = CalendarResourceClient(domain='ums.ac.id')
         client.auth_token = self.oauth2token
         client.ssl = True
         return client.GetResourceFeed().entry
     else: return None
Пример #2
0
 def GetCalendarResources(self, resource_id):
     if self.oauth2token is not None:
         client = CalendarResourceClient(domain='ums.ac.id')
         client.auth_token = self.oauth2token
         client.ssl = True
         return client.GetResource(resource_id=resource_id)
     else: return None
Пример #3
0
 def DelCalendarResources(self, resource_id):
     if self.oauth2token is not None:
         client = CalendarResourceClient(domain='ums.ac.id')
         client.auth_token = self.oauth2token
         client.ssl = True
         client.DeleteResource(resource_id=resource_id)
         return True
     else: return False
Пример #4
0
 def UpdateCalendarResources(self, resource_id, resource_common_name, resource_description, resource_email, resource_type):
     if self.oauth2token is not None:
         client = CalendarResourceClient(domain='ums.ac.id')
         client.auth_token = self.oauth2token
         client.ssl = True
         return client.UpdateResource(
             resource_id=resource_id,
             resource_common_name=resource_common_name,
             resource_description=resource_description,
             resource_email=resource_email,
             resource_type=resource_type)
     else: return False