id int32 0 252k | repo stringlengths 7 55 | path stringlengths 4 127 | func_name stringlengths 1 88 | original_string stringlengths 75 19.8k | language stringclasses 1
value | code stringlengths 75 19.8k | code_tokens list | docstring stringlengths 3 17.3k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 87 242 |
|---|---|---|---|---|---|---|---|---|---|---|---|
13,000 | Esri/ArcREST | src/arcrest/agol/services.py | FeatureLayer.getAttachment | def getAttachment(self, oid, attachment_id, out_folder=None):
"""
downloads a feature's attachment.
Inputs:
oid - object id of the feature
attachment_id - ID of the attachment. Should be an integer.
out_folder - save path of the file
Output:
... | python | def getAttachment(self, oid, attachment_id, out_folder=None):
"""
downloads a feature's attachment.
Inputs:
oid - object id of the feature
attachment_id - ID of the attachment. Should be an integer.
out_folder - save path of the file
Output:
... | [
"def",
"getAttachment",
"(",
"self",
",",
"oid",
",",
"attachment_id",
",",
"out_folder",
"=",
"None",
")",
":",
"attachments",
"=",
"self",
".",
"listAttachments",
"(",
"oid",
"=",
"oid",
")",
"if",
"\"attachmentInfos\"",
"in",
"attachments",
":",
"for",
... | downloads a feature's attachment.
Inputs:
oid - object id of the feature
attachment_id - ID of the attachment. Should be an integer.
out_folder - save path of the file
Output:
string - full path of the file | [
"downloads",
"a",
"feature",
"s",
"attachment",
"."
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/agol/services.py#L1550-L1571 |
13,001 | Esri/ArcREST | src/arcrest/agol/services.py | FeatureLayer.create_fc_template | def create_fc_template(self, out_path, out_name):
"""creates a featureclass template on local disk"""
fields = self.fields
objectIdField = self.objectIdField
geomType = self.geometryType
wkid = self.parentLayer.spatialReference['wkid']
return create_feature_class(out_path... | python | def create_fc_template(self, out_path, out_name):
"""creates a featureclass template on local disk"""
fields = self.fields
objectIdField = self.objectIdField
geomType = self.geometryType
wkid = self.parentLayer.spatialReference['wkid']
return create_feature_class(out_path... | [
"def",
"create_fc_template",
"(",
"self",
",",
"out_path",
",",
"out_name",
")",
":",
"fields",
"=",
"self",
".",
"fields",
"objectIdField",
"=",
"self",
".",
"objectIdField",
"geomType",
"=",
"self",
".",
"geometryType",
"wkid",
"=",
"self",
".",
"parentLay... | creates a featureclass template on local disk | [
"creates",
"a",
"featureclass",
"template",
"on",
"local",
"disk"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/agol/services.py#L1573-L1584 |
13,002 | Esri/ArcREST | src/arcrest/agol/services.py | FeatureLayer.create_feature_template | def create_feature_template(self):
"""creates a feature template"""
fields = self.fields
feat_schema = {}
att = {}
for fld in fields:
self._globalIdField
if not fld['name'] == self._objectIdField and not fld['name'] == self._globalIdField:
... | python | def create_feature_template(self):
"""creates a feature template"""
fields = self.fields
feat_schema = {}
att = {}
for fld in fields:
self._globalIdField
if not fld['name'] == self._objectIdField and not fld['name'] == self._globalIdField:
... | [
"def",
"create_feature_template",
"(",
"self",
")",
":",
"fields",
"=",
"self",
".",
"fields",
"feat_schema",
"=",
"{",
"}",
"att",
"=",
"{",
"}",
"for",
"fld",
"in",
"fields",
":",
"self",
".",
"_globalIdField",
"if",
"not",
"fld",
"[",
"'name'",
"]",... | creates a feature template | [
"creates",
"a",
"feature",
"template"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/agol/services.py#L1585-L1598 |
13,003 | Esri/ArcREST | src/arcrest/common/geometry.py | Point.spatialReference | def spatialReference(self):
"""returns the geometry spatial reference"""
if self._wkid == None and self._wkt is not None:
return {"wkt": self._wkt}
else:
return {"wkid": self._wkid} | python | def spatialReference(self):
"""returns the geometry spatial reference"""
if self._wkid == None and self._wkt is not None:
return {"wkt": self._wkt}
else:
return {"wkid": self._wkid} | [
"def",
"spatialReference",
"(",
"self",
")",
":",
"if",
"self",
".",
"_wkid",
"==",
"None",
"and",
"self",
".",
"_wkt",
"is",
"not",
"None",
":",
"return",
"{",
"\"wkt\"",
":",
"self",
".",
"_wkt",
"}",
"else",
":",
"return",
"{",
"\"wkid\"",
":",
... | returns the geometry spatial reference | [
"returns",
"the",
"geometry",
"spatial",
"reference"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/common/geometry.py#L107-L112 |
13,004 | Esri/ArcREST | src/arcrest/common/geometry.py | Point.asJSON | def asJSON(self):
""" returns a geometry as JSON """
value = self._json
if value is None:
value = json.dumps(self.asDictionary,
default=_date_handler)
self._json = value
return self._json | python | def asJSON(self):
""" returns a geometry as JSON """
value = self._json
if value is None:
value = json.dumps(self.asDictionary,
default=_date_handler)
self._json = value
return self._json | [
"def",
"asJSON",
"(",
"self",
")",
":",
"value",
"=",
"self",
".",
"_json",
"if",
"value",
"is",
"None",
":",
"value",
"=",
"json",
".",
"dumps",
"(",
"self",
".",
"asDictionary",
",",
"default",
"=",
"_date_handler",
")",
"self",
".",
"_json",
"=",
... | returns a geometry as JSON | [
"returns",
"a",
"geometry",
"as",
"JSON"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/common/geometry.py#L120-L127 |
13,005 | Esri/ArcREST | src/arcrest/common/geometry.py | Point.asArcPyObject | def asArcPyObject(self):
""" returns the Point as an ESRI arcpy.Point object """
if arcpyFound == False:
raise Exception("ArcPy is required to use this function")
return arcpy.AsShape(self.asDictionary, True) | python | def asArcPyObject(self):
""" returns the Point as an ESRI arcpy.Point object """
if arcpyFound == False:
raise Exception("ArcPy is required to use this function")
return arcpy.AsShape(self.asDictionary, True) | [
"def",
"asArcPyObject",
"(",
"self",
")",
":",
"if",
"arcpyFound",
"==",
"False",
":",
"raise",
"Exception",
"(",
"\"ArcPy is required to use this function\"",
")",
"return",
"arcpy",
".",
"AsShape",
"(",
"self",
".",
"asDictionary",
",",
"True",
")"
] | returns the Point as an ESRI arcpy.Point object | [
"returns",
"the",
"Point",
"as",
"an",
"ESRI",
"arcpy",
".",
"Point",
"object"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/common/geometry.py#L130-L134 |
13,006 | Esri/ArcREST | src/arcrest/common/geometry.py | Point.X | def X(self, value):
"""sets the X coordinate"""
if isinstance(value, (int, float,
long, types.NoneType)):
self._x = value | python | def X(self, value):
"""sets the X coordinate"""
if isinstance(value, (int, float,
long, types.NoneType)):
self._x = value | [
"def",
"X",
"(",
"self",
",",
"value",
")",
":",
"if",
"isinstance",
"(",
"value",
",",
"(",
"int",
",",
"float",
",",
"long",
",",
"types",
".",
"NoneType",
")",
")",
":",
"self",
".",
"_x",
"=",
"value"
] | sets the X coordinate | [
"sets",
"the",
"X",
"coordinate"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/common/geometry.py#L166-L170 |
13,007 | Esri/ArcREST | src/arcrest/common/geometry.py | Point.Y | def Y(self, value):
""" sets the Y coordinate """
if isinstance(value, (int, float,
long, types.NoneType)):
self._y = value | python | def Y(self, value):
""" sets the Y coordinate """
if isinstance(value, (int, float,
long, types.NoneType)):
self._y = value | [
"def",
"Y",
"(",
"self",
",",
"value",
")",
":",
"if",
"isinstance",
"(",
"value",
",",
"(",
"int",
",",
"float",
",",
"long",
",",
"types",
".",
"NoneType",
")",
")",
":",
"self",
".",
"_y",
"=",
"value"
] | sets the Y coordinate | [
"sets",
"the",
"Y",
"coordinate"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/common/geometry.py#L178-L182 |
13,008 | Esri/ArcREST | src/arcrest/common/geometry.py | Point.Z | def Z(self, value):
""" sets the Z coordinate """
if isinstance(value, (int, float,
long, types.NoneType)):
self._z = value | python | def Z(self, value):
""" sets the Z coordinate """
if isinstance(value, (int, float,
long, types.NoneType)):
self._z = value | [
"def",
"Z",
"(",
"self",
",",
"value",
")",
":",
"if",
"isinstance",
"(",
"value",
",",
"(",
"int",
",",
"float",
",",
"long",
",",
"types",
".",
"NoneType",
")",
")",
":",
"self",
".",
"_z",
"=",
"value"
] | sets the Z coordinate | [
"sets",
"the",
"Z",
"coordinate"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/common/geometry.py#L190-L194 |
13,009 | Esri/ArcREST | src/arcrest/common/geometry.py | Point.wkid | def wkid(self, value):
""" sets the wkid """
if isinstance(value, (int,
long)):
self._wkid = value | python | def wkid(self, value):
""" sets the wkid """
if isinstance(value, (int,
long)):
self._wkid = value | [
"def",
"wkid",
"(",
"self",
",",
"value",
")",
":",
"if",
"isinstance",
"(",
"value",
",",
"(",
"int",
",",
"long",
")",
")",
":",
"self",
".",
"_wkid",
"=",
"value"
] | sets the wkid | [
"sets",
"the",
"wkid"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/common/geometry.py#L202-L206 |
13,010 | Esri/ArcREST | src/arcrest/common/geometry.py | Envelope.asDictionary | def asDictionary(self):
""" returns the envelope as a dictionary """
template = {
"xmin" : self._xmin,
"ymin" : self._ymin,
"xmax" : self._xmax,
"ymax" : self._ymax,
"spatialReference" : self.spatialReference
}
if self._zmax is ... | python | def asDictionary(self):
""" returns the envelope as a dictionary """
template = {
"xmin" : self._xmin,
"ymin" : self._ymin,
"xmax" : self._xmax,
"ymax" : self._ymax,
"spatialReference" : self.spatialReference
}
if self._zmax is ... | [
"def",
"asDictionary",
"(",
"self",
")",
":",
"template",
"=",
"{",
"\"xmin\"",
":",
"self",
".",
"_xmin",
",",
"\"ymin\"",
":",
"self",
".",
"_ymin",
",",
"\"xmax\"",
":",
"self",
".",
"_xmax",
",",
"\"ymax\"",
":",
"self",
".",
"_ymax",
",",
"\"spa... | returns the envelope as a dictionary | [
"returns",
"the",
"envelope",
"as",
"a",
"dictionary"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/common/geometry.py#L563-L582 |
13,011 | Esri/ArcREST | src/arcrest/common/geometry.py | Envelope.asArcPyObject | def asArcPyObject(self):
""" returns the Envelope as an ESRI arcpy.Polygon object """
env = self.asDictionary
ring = [[
Point(env['xmin'], env['ymin'], self._wkid),
Point(env['xmax'], env['ymin'], self._wkid),
Point(env['xmax'], env['ymax'], self._wkid),
... | python | def asArcPyObject(self):
""" returns the Envelope as an ESRI arcpy.Polygon object """
env = self.asDictionary
ring = [[
Point(env['xmin'], env['ymin'], self._wkid),
Point(env['xmax'], env['ymin'], self._wkid),
Point(env['xmax'], env['ymax'], self._wkid),
... | [
"def",
"asArcPyObject",
"(",
"self",
")",
":",
"env",
"=",
"self",
".",
"asDictionary",
"ring",
"=",
"[",
"[",
"Point",
"(",
"env",
"[",
"'xmin'",
"]",
",",
"env",
"[",
"'ymin'",
"]",
",",
"self",
".",
"_wkid",
")",
",",
"Point",
"(",
"env",
"[",... | returns the Envelope as an ESRI arcpy.Polygon object | [
"returns",
"the",
"Envelope",
"as",
"an",
"ESRI",
"arcpy",
".",
"Polygon",
"object"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/common/geometry.py#L621-L634 |
13,012 | Esri/ArcREST | src/arcrest/opendata/_web.py | WebOperations._process_response | def _process_response(self, resp, out_folder=None):
""" processes the response object"""
CHUNK = 4056
maintype = self._mainType(resp)
contentDisposition = resp.headers.get('content-disposition')
contentEncoding = resp.headers.get('content-encoding')
contentType = resp.hea... | python | def _process_response(self, resp, out_folder=None):
""" processes the response object"""
CHUNK = 4056
maintype = self._mainType(resp)
contentDisposition = resp.headers.get('content-disposition')
contentEncoding = resp.headers.get('content-encoding')
contentType = resp.hea... | [
"def",
"_process_response",
"(",
"self",
",",
"resp",
",",
"out_folder",
"=",
"None",
")",
":",
"CHUNK",
"=",
"4056",
"maintype",
"=",
"self",
".",
"_mainType",
"(",
"resp",
")",
"contentDisposition",
"=",
"resp",
".",
"headers",
".",
"get",
"(",
"'conte... | processes the response object | [
"processes",
"the",
"response",
"object"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/opendata/_web.py#L238-L279 |
13,013 | Esri/ArcREST | src/arcrest/manageags/_security.py | Security.addUsersToRole | def addUsersToRole(self, rolename, users):
""" Assigns a role to multiple users """
params = {
"f" : "json",
"rolename" : rolename,
"users" : users
}
rURL = self._url + "/roles/addUsersToRole"
return self._post(url=rURL, param_dict=params,
... | python | def addUsersToRole(self, rolename, users):
""" Assigns a role to multiple users """
params = {
"f" : "json",
"rolename" : rolename,
"users" : users
}
rURL = self._url + "/roles/addUsersToRole"
return self._post(url=rURL, param_dict=params,
... | [
"def",
"addUsersToRole",
"(",
"self",
",",
"rolename",
",",
"users",
")",
":",
"params",
"=",
"{",
"\"f\"",
":",
"\"json\"",
",",
"\"rolename\"",
":",
"rolename",
",",
"\"users\"",
":",
"users",
"}",
"rURL",
"=",
"self",
".",
"_url",
"+",
"\"/roles/addUs... | Assigns a role to multiple users | [
"Assigns",
"a",
"role",
"to",
"multiple",
"users"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageags/_security.py#L156-L167 |
13,014 | Esri/ArcREST | src/arcrest/manageags/_system.py | System.serverProperties | def serverProperties(self):
"""gets the server properties for the site as an object"""
return ServerProperties(url=self._url + "/properties",
securityHandler=self._securityHandler,
proxy_url=self._proxy_url,
p... | python | def serverProperties(self):
"""gets the server properties for the site as an object"""
return ServerProperties(url=self._url + "/properties",
securityHandler=self._securityHandler,
proxy_url=self._proxy_url,
p... | [
"def",
"serverProperties",
"(",
"self",
")",
":",
"return",
"ServerProperties",
"(",
"url",
"=",
"self",
".",
"_url",
"+",
"\"/properties\"",
",",
"securityHandler",
"=",
"self",
".",
"_securityHandler",
",",
"proxy_url",
"=",
"self",
".",
"_proxy_url",
",",
... | gets the server properties for the site as an object | [
"gets",
"the",
"server",
"properties",
"for",
"the",
"site",
"as",
"an",
"object"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageags/_system.py#L69-L75 |
13,015 | Esri/ArcREST | src/arcrest/manageags/_system.py | System.serverDirectories | def serverDirectories(self):
"""returns the server directory object in a list"""
directs = []
url = self._url + "/directories"
params = {
"f" : "json"
}
res = self._get(url=url,
param_dict=params,
securityH... | python | def serverDirectories(self):
"""returns the server directory object in a list"""
directs = []
url = self._url + "/directories"
params = {
"f" : "json"
}
res = self._get(url=url,
param_dict=params,
securityH... | [
"def",
"serverDirectories",
"(",
"self",
")",
":",
"directs",
"=",
"[",
"]",
"url",
"=",
"self",
".",
"_url",
"+",
"\"/directories\"",
"params",
"=",
"{",
"\"f\"",
":",
"\"json\"",
"}",
"res",
"=",
"self",
".",
"_get",
"(",
"url",
"=",
"url",
",",
... | returns the server directory object in a list | [
"returns",
"the",
"server",
"directory",
"object",
"in",
"a",
"list"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageags/_system.py#L78-L97 |
13,016 | Esri/ArcREST | src/arcrest/manageags/_system.py | System.Jobs | def Jobs(self):
"""get the Jobs object"""
url = self._url + "/jobs"
return Jobs(url=url,
securityHandler=self._securityHandler,
proxy_url=self._proxy_url,
proxy_port=self._proxy_port,
initialize=True) | python | def Jobs(self):
"""get the Jobs object"""
url = self._url + "/jobs"
return Jobs(url=url,
securityHandler=self._securityHandler,
proxy_url=self._proxy_url,
proxy_port=self._proxy_port,
initialize=True) | [
"def",
"Jobs",
"(",
"self",
")",
":",
"url",
"=",
"self",
".",
"_url",
"+",
"\"/jobs\"",
"return",
"Jobs",
"(",
"url",
"=",
"url",
",",
"securityHandler",
"=",
"self",
".",
"_securityHandler",
",",
"proxy_url",
"=",
"self",
".",
"_proxy_url",
",",
"pro... | get the Jobs object | [
"get",
"the",
"Jobs",
"object"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageags/_system.py#L218-L225 |
13,017 | Esri/ArcREST | src/arcrest/manageags/_system.py | System.configurationStore | def configurationStore(self):
"""returns the ConfigurationStore object for this site"""
url = self._url + "/configstore"
return ConfigurationStore(url=url,
securityHandler=self._securityHandler,
proxy_url=self._proxy_url,
... | python | def configurationStore(self):
"""returns the ConfigurationStore object for this site"""
url = self._url + "/configstore"
return ConfigurationStore(url=url,
securityHandler=self._securityHandler,
proxy_url=self._proxy_url,
... | [
"def",
"configurationStore",
"(",
"self",
")",
":",
"url",
"=",
"self",
".",
"_url",
"+",
"\"/configstore\"",
"return",
"ConfigurationStore",
"(",
"url",
"=",
"url",
",",
"securityHandler",
"=",
"self",
".",
"_securityHandler",
",",
"proxy_url",
"=",
"self",
... | returns the ConfigurationStore object for this site | [
"returns",
"the",
"ConfigurationStore",
"object",
"for",
"this",
"site"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageags/_system.py#L351-L358 |
13,018 | Esri/ArcREST | src/arcresthelper/featureservicetools.py | featureservicetools.EnableEditingOnService | def EnableEditingOnService(self, url, definition = None):
"""Enables editing capabilities on a feature service.
Args:
url (str): The URL of the feature service.
definition (dict): A dictionary containing valid definition values. Defaults to ``None``.
Returns:
... | python | def EnableEditingOnService(self, url, definition = None):
"""Enables editing capabilities on a feature service.
Args:
url (str): The URL of the feature service.
definition (dict): A dictionary containing valid definition values. Defaults to ``None``.
Returns:
... | [
"def",
"EnableEditingOnService",
"(",
"self",
",",
"url",
",",
"definition",
"=",
"None",
")",
":",
"adminFS",
"=",
"AdminFeatureService",
"(",
"url",
"=",
"url",
",",
"securityHandler",
"=",
"self",
".",
"_securityHandler",
")",
"if",
"definition",
"is",
"N... | Enables editing capabilities on a feature service.
Args:
url (str): The URL of the feature service.
definition (dict): A dictionary containing valid definition values. Defaults to ``None``.
Returns:
dict: The existing feature service definition capabilities.
... | [
"Enables",
"editing",
"capabilities",
"on",
"a",
"feature",
"service",
"."
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcresthelper/featureservicetools.py#L197-L252 |
13,019 | Esri/ArcREST | src/arcresthelper/featureservicetools.py | featureservicetools.enableSync | def enableSync(self, url, definition = None):
"""Enables Sync capability for an AGOL feature service.
Args:
url (str): The URL of the feature service.
definition (dict): A dictionary containing valid definition values. Defaults to ``None``.
Returns:
dict: The... | python | def enableSync(self, url, definition = None):
"""Enables Sync capability for an AGOL feature service.
Args:
url (str): The URL of the feature service.
definition (dict): A dictionary containing valid definition values. Defaults to ``None``.
Returns:
dict: The... | [
"def",
"enableSync",
"(",
"self",
",",
"url",
",",
"definition",
"=",
"None",
")",
":",
"adminFS",
"=",
"AdminFeatureService",
"(",
"url",
"=",
"url",
",",
"securityHandler",
"=",
"self",
".",
"_securityHandler",
")",
"cap",
"=",
"str",
"(",
"adminFS",
"... | Enables Sync capability for an AGOL feature service.
Args:
url (str): The URL of the feature service.
definition (dict): A dictionary containing valid definition values. Defaults to ``None``.
Returns:
dict: The result from :py:func:`arcrest.hostedservice.service.Admi... | [
"Enables",
"Sync",
"capability",
"for",
"an",
"AGOL",
"feature",
"service",
"."
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcresthelper/featureservicetools.py#L254-L281 |
13,020 | Esri/ArcREST | src/arcresthelper/featureservicetools.py | featureservicetools.GetFeatureService | def GetFeatureService(self, itemId, returnURLOnly=False):
"""Obtains a feature service by item ID.
Args:
itemId (str): The feature service's item ID.
returnURLOnly (bool): A boolean value to return the URL of the feature service. Defaults to ``False``.
Returns:
... | python | def GetFeatureService(self, itemId, returnURLOnly=False):
"""Obtains a feature service by item ID.
Args:
itemId (str): The feature service's item ID.
returnURLOnly (bool): A boolean value to return the URL of the feature service. Defaults to ``False``.
Returns:
... | [
"def",
"GetFeatureService",
"(",
"self",
",",
"itemId",
",",
"returnURLOnly",
"=",
"False",
")",
":",
"admin",
"=",
"None",
"item",
"=",
"None",
"try",
":",
"admin",
"=",
"arcrest",
".",
"manageorg",
".",
"Administration",
"(",
"securityHandler",
"=",
"sel... | Obtains a feature service by item ID.
Args:
itemId (str): The feature service's item ID.
returnURLOnly (bool): A boolean value to return the URL of the feature service. Defaults to ``False``.
Returns:
When ``returnURLOnly`` is ``True``, the URL of the feature service... | [
"Obtains",
"a",
"feature",
"service",
"by",
"item",
"ID",
"."
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcresthelper/featureservicetools.py#L313-L362 |
13,021 | Esri/ArcREST | src/arcresthelper/featureservicetools.py | featureservicetools.GetLayerFromFeatureServiceByURL | def GetLayerFromFeatureServiceByURL(self, url, layerName="", returnURLOnly=False):
"""Obtains a layer from a feature service by URL reference.
Args:
url (str): The URL of the feature service.
layerName (str): The name of the layer. Defaults to ``""``.
returnURLOnly (... | python | def GetLayerFromFeatureServiceByURL(self, url, layerName="", returnURLOnly=False):
"""Obtains a layer from a feature service by URL reference.
Args:
url (str): The URL of the feature service.
layerName (str): The name of the layer. Defaults to ``""``.
returnURLOnly (... | [
"def",
"GetLayerFromFeatureServiceByURL",
"(",
"self",
",",
"url",
",",
"layerName",
"=",
"\"\"",
",",
"returnURLOnly",
"=",
"False",
")",
":",
"fs",
"=",
"None",
"try",
":",
"fs",
"=",
"arcrest",
".",
"agol",
".",
"FeatureService",
"(",
"url",
"=",
"url... | Obtains a layer from a feature service by URL reference.
Args:
url (str): The URL of the feature service.
layerName (str): The name of the layer. Defaults to ``""``.
returnURLOnly (bool): A boolean value to return the URL of the layer. Defaults to ``False``.
Returns:... | [
"Obtains",
"a",
"layer",
"from",
"a",
"feature",
"service",
"by",
"URL",
"reference",
"."
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcresthelper/featureservicetools.py#L364-L397 |
13,022 | Esri/ArcREST | src/arcresthelper/featureservicetools.py | featureservicetools.GetLayerFromFeatureService | def GetLayerFromFeatureService(self, fs, layerName="", returnURLOnly=False):
"""Obtains a layer from a feature service by feature service reference.
Args:
fs (FeatureService): The feature service from which to obtain the layer.
layerName (str): The name of the layer. Defaults to... | python | def GetLayerFromFeatureService(self, fs, layerName="", returnURLOnly=False):
"""Obtains a layer from a feature service by feature service reference.
Args:
fs (FeatureService): The feature service from which to obtain the layer.
layerName (str): The name of the layer. Defaults to... | [
"def",
"GetLayerFromFeatureService",
"(",
"self",
",",
"fs",
",",
"layerName",
"=",
"\"\"",
",",
"returnURLOnly",
"=",
"False",
")",
":",
"layers",
"=",
"None",
"table",
"=",
"None",
"layer",
"=",
"None",
"sublayer",
"=",
"None",
"try",
":",
"layers",
"=... | Obtains a layer from a feature service by feature service reference.
Args:
fs (FeatureService): The feature service from which to obtain the layer.
layerName (str): The name of the layer. Defaults to ``""``.
returnURLOnly (bool): A boolean value to return the URL of the laye... | [
"Obtains",
"a",
"layer",
"from",
"a",
"feature",
"service",
"by",
"feature",
"service",
"reference",
"."
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcresthelper/featureservicetools.py#L399-L461 |
13,023 | Esri/ArcREST | src/arcresthelper/featureservicetools.py | featureservicetools.DeleteFeaturesFromFeatureLayer | def DeleteFeaturesFromFeatureLayer(self, url, sql, chunksize=0):
"""Removes features from a hosted feature service layer by SQL query.
Args:
url (str): The URL of the feature service layer.
sql (str): The SQL query to apply against the feature service.
Those feat... | python | def DeleteFeaturesFromFeatureLayer(self, url, sql, chunksize=0):
"""Removes features from a hosted feature service layer by SQL query.
Args:
url (str): The URL of the feature service layer.
sql (str): The SQL query to apply against the feature service.
Those feat... | [
"def",
"DeleteFeaturesFromFeatureLayer",
"(",
"self",
",",
"url",
",",
"sql",
",",
"chunksize",
"=",
"0",
")",
":",
"fl",
"=",
"None",
"try",
":",
"fl",
"=",
"FeatureLayer",
"(",
"url",
"=",
"url",
",",
"securityHandler",
"=",
"self",
".",
"_securityHand... | Removes features from a hosted feature service layer by SQL query.
Args:
url (str): The URL of the feature service layer.
sql (str): The SQL query to apply against the feature service.
Those features that satisfy the query will be deleted.
chunksize (int): Th... | [
"Removes",
"features",
"from",
"a",
"hosted",
"feature",
"service",
"layer",
"by",
"SQL",
"query",
"."
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcresthelper/featureservicetools.py#L570-L648 |
13,024 | Esri/ArcREST | src/arcresthelper/featureservicetools.py | featureservicetools.QueryAllFeatures | def QueryAllFeatures(self, url=None,
where="1=1",
out_fields="*",
timeFilter=None,
geometryFilter=None,
returnFeatureClass=False,
out_fc=None,
outSR=No... | python | def QueryAllFeatures(self, url=None,
where="1=1",
out_fields="*",
timeFilter=None,
geometryFilter=None,
returnFeatureClass=False,
out_fc=None,
outSR=No... | [
"def",
"QueryAllFeatures",
"(",
"self",
",",
"url",
"=",
"None",
",",
"where",
"=",
"\"1=1\"",
",",
"out_fields",
"=",
"\"*\"",
",",
"timeFilter",
"=",
"None",
",",
"geometryFilter",
"=",
"None",
",",
"returnFeatureClass",
"=",
"False",
",",
"out_fc",
"=",... | Performs an SQL query against a hosted feature service layer
and returns all features regardless of service limit.
Args:
url (str): The URL of the feature service layer.
where - the selection sql statement
out_fields - the attribute fields to return
timeF... | [
"Performs",
"an",
"SQL",
"query",
"against",
"a",
"hosted",
"feature",
"service",
"layer",
"and",
"returns",
"all",
"features",
"regardless",
"of",
"service",
"limit",
"."
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcresthelper/featureservicetools.py#L650-L756 |
13,025 | Esri/ArcREST | src/arcrest/cmp/community.py | CommunityMapsProgram.contributionStatus | def contributionStatus(self):
"""gets the contribution status of a user"""
import time
url = "%s/contributors/%s/activeContribution" % (self.root, quote(self.contributorUID))
params = {
"agolUserToken" : self._agolSH.token,
"f" : "json"
}
res = sel... | python | def contributionStatus(self):
"""gets the contribution status of a user"""
import time
url = "%s/contributors/%s/activeContribution" % (self.root, quote(self.contributorUID))
params = {
"agolUserToken" : self._agolSH.token,
"f" : "json"
}
res = sel... | [
"def",
"contributionStatus",
"(",
"self",
")",
":",
"import",
"time",
"url",
"=",
"\"%s/contributors/%s/activeContribution\"",
"%",
"(",
"self",
".",
"root",
",",
"quote",
"(",
"self",
".",
"contributorUID",
")",
")",
"params",
"=",
"{",
"\"agolUserToken\"",
"... | gets the contribution status of a user | [
"gets",
"the",
"contribution",
"status",
"of",
"a",
"user"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/cmp/community.py#L62-L77 |
13,026 | Esri/ArcREST | src/arcrest/cmp/community.py | CommunityMapsProgram.user | def user(self):
"""gets the user properties"""
if self._user is None:
url = "%s/users/%s" % (self.root, self._username)
self._user = CMPUser(url=url,
securityHandler=self._securityHandler,
proxy_port=self._proxy_po... | python | def user(self):
"""gets the user properties"""
if self._user is None:
url = "%s/users/%s" % (self.root, self._username)
self._user = CMPUser(url=url,
securityHandler=self._securityHandler,
proxy_port=self._proxy_po... | [
"def",
"user",
"(",
"self",
")",
":",
"if",
"self",
".",
"_user",
"is",
"None",
":",
"url",
"=",
"\"%s/users/%s\"",
"%",
"(",
"self",
".",
"root",
",",
"self",
".",
"_username",
")",
"self",
".",
"_user",
"=",
"CMPUser",
"(",
"url",
"=",
"url",
"... | gets the user properties | [
"gets",
"the",
"user",
"properties"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/cmp/community.py#L84-L93 |
13,027 | Esri/ArcREST | src/arcrest/cmp/community.py | CommunityMapsProgram.metadataContributer | def metadataContributer(self):
"""gets the metadata featurelayer object"""
if self._metaFL is None:
fl = FeatureService(url=self._metadataURL,
proxy_url=self._proxy_url,
proxy_port=self._proxy_port)
self._metaFS = fl
... | python | def metadataContributer(self):
"""gets the metadata featurelayer object"""
if self._metaFL is None:
fl = FeatureService(url=self._metadataURL,
proxy_url=self._proxy_url,
proxy_port=self._proxy_port)
self._metaFS = fl
... | [
"def",
"metadataContributer",
"(",
"self",
")",
":",
"if",
"self",
".",
"_metaFL",
"is",
"None",
":",
"fl",
"=",
"FeatureService",
"(",
"url",
"=",
"self",
".",
"_metadataURL",
",",
"proxy_url",
"=",
"self",
".",
"_proxy_url",
",",
"proxy_port",
"=",
"se... | gets the metadata featurelayer object | [
"gets",
"the",
"metadata",
"featurelayer",
"object"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/cmp/community.py#L108-L115 |
13,028 | Esri/ArcREST | src/arcrest/common/general.py | Feature.set_value | def set_value(self, field_name, value):
""" sets an attribute value for a given field name """
if field_name in self.fields:
if not value is None:
self._dict['attributes'][field_name] = _unicode_convert(value)
else:
pass
elif field_name.upp... | python | def set_value(self, field_name, value):
""" sets an attribute value for a given field name """
if field_name in self.fields:
if not value is None:
self._dict['attributes'][field_name] = _unicode_convert(value)
else:
pass
elif field_name.upp... | [
"def",
"set_value",
"(",
"self",
",",
"field_name",
",",
"value",
")",
":",
"if",
"field_name",
"in",
"self",
".",
"fields",
":",
"if",
"not",
"value",
"is",
"None",
":",
"self",
".",
"_dict",
"[",
"'attributes'",
"]",
"[",
"field_name",
"]",
"=",
"_... | sets an attribute value for a given field name | [
"sets",
"an",
"attribute",
"value",
"for",
"a",
"given",
"field",
"name"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/common/general.py#L136-L160 |
13,029 | Esri/ArcREST | src/arcrest/common/general.py | Feature.get_value | def get_value(self, field_name):
""" returns a value for a given field name """
if field_name in self.fields:
return self._dict['attributes'][field_name]
elif field_name.upper() in ['SHAPE', 'SHAPE@', "GEOMETRY"]:
return self._dict['geometry']
return None | python | def get_value(self, field_name):
""" returns a value for a given field name """
if field_name in self.fields:
return self._dict['attributes'][field_name]
elif field_name.upper() in ['SHAPE', 'SHAPE@', "GEOMETRY"]:
return self._dict['geometry']
return None | [
"def",
"get_value",
"(",
"self",
",",
"field_name",
")",
":",
"if",
"field_name",
"in",
"self",
".",
"fields",
":",
"return",
"self",
".",
"_dict",
"[",
"'attributes'",
"]",
"[",
"field_name",
"]",
"elif",
"field_name",
".",
"upper",
"(",
")",
"in",
"[... | returns a value for a given field name | [
"returns",
"a",
"value",
"for",
"a",
"given",
"field",
"name"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/common/general.py#L162-L168 |
13,030 | Esri/ArcREST | src/arcrest/common/general.py | Feature.asDictionary | def asDictionary(self):
"""returns the feature as a dictionary"""
feat_dict = {}
if self._geom is not None:
if 'feature' in self._dict:
feat_dict['geometry'] = self._dict['feature']['geometry']
elif 'geometry' in self._dict:
feat_dict['geom... | python | def asDictionary(self):
"""returns the feature as a dictionary"""
feat_dict = {}
if self._geom is not None:
if 'feature' in self._dict:
feat_dict['geometry'] = self._dict['feature']['geometry']
elif 'geometry' in self._dict:
feat_dict['geom... | [
"def",
"asDictionary",
"(",
"self",
")",
":",
"feat_dict",
"=",
"{",
"}",
"if",
"self",
".",
"_geom",
"is",
"not",
"None",
":",
"if",
"'feature'",
"in",
"self",
".",
"_dict",
":",
"feat_dict",
"[",
"'geometry'",
"]",
"=",
"self",
".",
"_dict",
"[",
... | returns the feature as a dictionary | [
"returns",
"the",
"feature",
"as",
"a",
"dictionary"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/common/general.py#L171-L183 |
13,031 | Esri/ArcREST | src/arcrest/common/general.py | Feature.geometry | def geometry(self):
"""returns the feature geometry"""
if arcpyFound:
if self._geom is None:
if 'feature' in self._dict:
self._geom = arcpy.AsShape(self._dict['feature']['geometry'], esri_json=True)
elif 'geometry' in self._dict:
... | python | def geometry(self):
"""returns the feature geometry"""
if arcpyFound:
if self._geom is None:
if 'feature' in self._dict:
self._geom = arcpy.AsShape(self._dict['feature']['geometry'], esri_json=True)
elif 'geometry' in self._dict:
... | [
"def",
"geometry",
"(",
"self",
")",
":",
"if",
"arcpyFound",
":",
"if",
"self",
".",
"_geom",
"is",
"None",
":",
"if",
"'feature'",
"in",
"self",
".",
"_dict",
":",
"self",
".",
"_geom",
"=",
"arcpy",
".",
"AsShape",
"(",
"self",
".",
"_dict",
"["... | returns the feature geometry | [
"returns",
"the",
"feature",
"geometry"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/common/general.py#L204-L213 |
13,032 | Esri/ArcREST | src/arcrest/common/general.py | Feature.fields | def fields(self):
""" returns a list of feature fields """
if 'feature' in self._dict:
self._attributes = self._dict['feature']['attributes']
else:
self._attributes = self._dict['attributes']
return self._attributes.keys() | python | def fields(self):
""" returns a list of feature fields """
if 'feature' in self._dict:
self._attributes = self._dict['feature']['attributes']
else:
self._attributes = self._dict['attributes']
return self._attributes.keys() | [
"def",
"fields",
"(",
"self",
")",
":",
"if",
"'feature'",
"in",
"self",
".",
"_dict",
":",
"self",
".",
"_attributes",
"=",
"self",
".",
"_dict",
"[",
"'feature'",
"]",
"[",
"'attributes'",
"]",
"else",
":",
"self",
".",
"_attributes",
"=",
"self",
... | returns a list of feature fields | [
"returns",
"a",
"list",
"of",
"feature",
"fields"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/common/general.py#L228-L234 |
13,033 | Esri/ArcREST | src/arcrest/common/general.py | Feature.geometryType | def geometryType(self):
""" returns the feature's geometry type """
if self._geomType is None:
if self.geometry is not None:
self._geomType = self.geometry.type
else:
self._geomType = "Table"
return self._geomType | python | def geometryType(self):
""" returns the feature's geometry type """
if self._geomType is None:
if self.geometry is not None:
self._geomType = self.geometry.type
else:
self._geomType = "Table"
return self._geomType | [
"def",
"geometryType",
"(",
"self",
")",
":",
"if",
"self",
".",
"_geomType",
"is",
"None",
":",
"if",
"self",
".",
"geometry",
"is",
"not",
"None",
":",
"self",
".",
"_geomType",
"=",
"self",
".",
"geometry",
".",
"type",
"else",
":",
"self",
".",
... | returns the feature's geometry type | [
"returns",
"the",
"feature",
"s",
"geometry",
"type"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/common/general.py#L237-L244 |
13,034 | Esri/ArcREST | src/arcrest/common/general.py | MosaicRuleObject.value | def value(self):
"""
gets the mosaic rule object as a dictionary
"""
if self.mosaicMethod == "esriMosaicNone" or\
self.mosaicMethod == "esriMosaicCenter" or \
self.mosaicMethod == "esriMosaicNorthwest" or \
self.mosaicMethod == "esriMosaicNadir":
... | python | def value(self):
"""
gets the mosaic rule object as a dictionary
"""
if self.mosaicMethod == "esriMosaicNone" or\
self.mosaicMethod == "esriMosaicCenter" or \
self.mosaicMethod == "esriMosaicNorthwest" or \
self.mosaicMethod == "esriMosaicNadir":
... | [
"def",
"value",
"(",
"self",
")",
":",
"if",
"self",
".",
"mosaicMethod",
"==",
"\"esriMosaicNone\"",
"or",
"self",
".",
"mosaicMethod",
"==",
"\"esriMosaicCenter\"",
"or",
"self",
".",
"mosaicMethod",
"==",
"\"esriMosaicNorthwest\"",
"or",
"self",
".",
"mosaicM... | gets the mosaic rule object as a dictionary | [
"gets",
"the",
"mosaic",
"rule",
"object",
"as",
"a",
"dictionary"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/common/general.py#L478-L529 |
13,035 | Esri/ArcREST | src/arcrest/common/general.py | FeatureSet.fromJSON | def fromJSON(jsonValue):
"""returns a featureset from a JSON string"""
jd = json.loads(jsonValue)
features = []
if 'fields' in jd:
fields = jd['fields']
else:
fields = {'fields':[]}
if 'features' in jd:
for feat in jd['features']:
... | python | def fromJSON(jsonValue):
"""returns a featureset from a JSON string"""
jd = json.loads(jsonValue)
features = []
if 'fields' in jd:
fields = jd['fields']
else:
fields = {'fields':[]}
if 'features' in jd:
for feat in jd['features']:
... | [
"def",
"fromJSON",
"(",
"jsonValue",
")",
":",
"jd",
"=",
"json",
".",
"loads",
"(",
"jsonValue",
")",
"features",
"=",
"[",
"]",
"if",
"'fields'",
"in",
"jd",
":",
"fields",
"=",
"jd",
"[",
"'fields'",
"]",
"else",
":",
"fields",
"=",
"{",
"'field... | returns a featureset from a JSON string | [
"returns",
"a",
"featureset",
"from",
"a",
"JSON",
"string"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/common/general.py#L609-L636 |
13,036 | Esri/ArcREST | src/arcrest/common/general.py | FeatureSet.spatialReference | def spatialReference(self, value):
"""sets the featureset's spatial reference"""
if isinstance(value, SpatialReference):
self._spatialReference = value
elif isinstance(value, int):
self._spatialReference = SpatialReference(wkid=value)
elif isinstance(value, str) a... | python | def spatialReference(self, value):
"""sets the featureset's spatial reference"""
if isinstance(value, SpatialReference):
self._spatialReference = value
elif isinstance(value, int):
self._spatialReference = SpatialReference(wkid=value)
elif isinstance(value, str) a... | [
"def",
"spatialReference",
"(",
"self",
",",
"value",
")",
":",
"if",
"isinstance",
"(",
"value",
",",
"SpatialReference",
")",
":",
"self",
".",
"_spatialReference",
"=",
"value",
"elif",
"isinstance",
"(",
"value",
",",
"int",
")",
":",
"self",
".",
"_... | sets the featureset's spatial reference | [
"sets",
"the",
"featureset",
"s",
"spatial",
"reference"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/common/general.py#L649-L669 |
13,037 | Esri/ArcREST | src/arcrest/manageorg/_portals.py | Portals.regions | def regions(self):
"""gets the regions value"""
url = "%s/regions" % self.root
params = {"f": "json"}
return self._get(url=url,
param_dict=params,
proxy_url=self._proxy_url,
proxy_port=self._proxy_port) | python | def regions(self):
"""gets the regions value"""
url = "%s/regions" % self.root
params = {"f": "json"}
return self._get(url=url,
param_dict=params,
proxy_url=self._proxy_url,
proxy_port=self._proxy_port) | [
"def",
"regions",
"(",
"self",
")",
":",
"url",
"=",
"\"%s/regions\"",
"%",
"self",
".",
"root",
"params",
"=",
"{",
"\"f\"",
":",
"\"json\"",
"}",
"return",
"self",
".",
"_get",
"(",
"url",
"=",
"url",
",",
"param_dict",
"=",
"params",
",",
"proxy_u... | gets the regions value | [
"gets",
"the",
"regions",
"value"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageorg/_portals.py#L50-L57 |
13,038 | Esri/ArcREST | src/arcrest/manageorg/_portals.py | Portals.portalSelf | def portalSelf(self):
"""The portal to which the current user belongs. This is an
organizational portal if the user belongs to an organization or the
default portal if the user does not belong to one"""
url = "%s/self" % self.root
return Portal(url=url,
secu... | python | def portalSelf(self):
"""The portal to which the current user belongs. This is an
organizational portal if the user belongs to an organization or the
default portal if the user does not belong to one"""
url = "%s/self" % self.root
return Portal(url=url,
secu... | [
"def",
"portalSelf",
"(",
"self",
")",
":",
"url",
"=",
"\"%s/self\"",
"%",
"self",
".",
"root",
"return",
"Portal",
"(",
"url",
"=",
"url",
",",
"securityHandler",
"=",
"self",
".",
"_securityHandler",
",",
"proxy_url",
"=",
"self",
".",
"_proxy_url",
"... | The portal to which the current user belongs. This is an
organizational portal if the user belongs to an organization or the
default portal if the user does not belong to one | [
"The",
"portal",
"to",
"which",
"the",
"current",
"user",
"belongs",
".",
"This",
"is",
"an",
"organizational",
"portal",
"if",
"the",
"user",
"belongs",
"to",
"an",
"organization",
"or",
"the",
"default",
"portal",
"if",
"the",
"user",
"does",
"not",
"bel... | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageorg/_portals.py#L80-L89 |
13,039 | Esri/ArcREST | src/arcrest/manageorg/_portals.py | Portals.portal | def portal(self, portalID=None):
"""returns a specific reference to a portal"""
if portalID is None:
portalID = self.portalSelf.id
url = "%s/%s" % (self.root, portalID)
return Portal(url=url,
securityHandler=self._securityHandler,
proxy_url... | python | def portal(self, portalID=None):
"""returns a specific reference to a portal"""
if portalID is None:
portalID = self.portalSelf.id
url = "%s/%s" % (self.root, portalID)
return Portal(url=url,
securityHandler=self._securityHandler,
proxy_url... | [
"def",
"portal",
"(",
"self",
",",
"portalID",
"=",
"None",
")",
":",
"if",
"portalID",
"is",
"None",
":",
"portalID",
"=",
"self",
".",
"portalSelf",
".",
"id",
"url",
"=",
"\"%s/%s\"",
"%",
"(",
"self",
".",
"root",
",",
"portalID",
")",
"return",
... | returns a specific reference to a portal | [
"returns",
"a",
"specific",
"reference",
"to",
"a",
"portal"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageorg/_portals.py#L91-L100 |
13,040 | Esri/ArcREST | src/arcrest/manageorg/_portals.py | Portal._findPortalId | def _findPortalId(self):
"""gets the portal id for a site if not known."""
if not self.root.lower().endswith("/self"):
url = self.root + "/self"
else:
url = self.root
params = {
"f" : "json"
}
res = self._get(url=url, param_dict=params,... | python | def _findPortalId(self):
"""gets the portal id for a site if not known."""
if not self.root.lower().endswith("/self"):
url = self.root + "/self"
else:
url = self.root
params = {
"f" : "json"
}
res = self._get(url=url, param_dict=params,... | [
"def",
"_findPortalId",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"root",
".",
"lower",
"(",
")",
".",
"endswith",
"(",
"\"/self\"",
")",
":",
"url",
"=",
"self",
".",
"root",
"+",
"\"/self\"",
"else",
":",
"url",
"=",
"self",
".",
"root",
... | gets the portal id for a site if not known. | [
"gets",
"the",
"portal",
"id",
"for",
"a",
"site",
"if",
"not",
"known",
"."
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageorg/_portals.py#L248-L263 |
13,041 | Esri/ArcREST | src/arcrest/manageorg/_portals.py | Portal.portalId | def portalId(self):
"""gets the portal Id"""
if self._portalId is None:
self._portalId = self._findPortalId()
return self._portalId | python | def portalId(self):
"""gets the portal Id"""
if self._portalId is None:
self._portalId = self._findPortalId()
return self._portalId | [
"def",
"portalId",
"(",
"self",
")",
":",
"if",
"self",
".",
"_portalId",
"is",
"None",
":",
"self",
".",
"_portalId",
"=",
"self",
".",
"_findPortalId",
"(",
")",
"return",
"self",
".",
"_portalId"
] | gets the portal Id | [
"gets",
"the",
"portal",
"Id"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageorg/_portals.py#L384-L388 |
13,042 | Esri/ArcREST | src/arcrest/manageorg/_portals.py | Portal.featureServers | def featureServers(self):
"""gets the hosting feature AGS Server"""
if self.urls == {}:
return {}
featuresUrls = self.urls['urls']['features']
if 'https' in featuresUrls:
res = featuresUrls['https']
elif 'http' in featuresUrls:
res = featuresU... | python | def featureServers(self):
"""gets the hosting feature AGS Server"""
if self.urls == {}:
return {}
featuresUrls = self.urls['urls']['features']
if 'https' in featuresUrls:
res = featuresUrls['https']
elif 'http' in featuresUrls:
res = featuresU... | [
"def",
"featureServers",
"(",
"self",
")",
":",
"if",
"self",
".",
"urls",
"==",
"{",
"}",
":",
"return",
"{",
"}",
"featuresUrls",
"=",
"self",
".",
"urls",
"[",
"'urls'",
"]",
"[",
"'features'",
"]",
"if",
"'https'",
"in",
"featuresUrls",
":",
"res... | gets the hosting feature AGS Server | [
"gets",
"the",
"hosting",
"feature",
"AGS",
"Server"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageorg/_portals.py#L1000-L1028 |
13,043 | Esri/ArcREST | src/arcrest/manageorg/_portals.py | Portal.update | def update(self,
updatePortalParameters,
clearEmptyFields=False):
"""
The Update operation allows administrators only to update the
organization information such as name, description, thumbnail, and
featured groups.
Inputs:
updatePortalPa... | python | def update(self,
updatePortalParameters,
clearEmptyFields=False):
"""
The Update operation allows administrators only to update the
organization information such as name, description, thumbnail, and
featured groups.
Inputs:
updatePortalPa... | [
"def",
"update",
"(",
"self",
",",
"updatePortalParameters",
",",
"clearEmptyFields",
"=",
"False",
")",
":",
"url",
"=",
"self",
".",
"root",
"+",
"\"/update\"",
"params",
"=",
"{",
"\"f\"",
":",
"\"json\"",
",",
"\"clearEmptyFields\"",
":",
"clearEmptyFields... | The Update operation allows administrators only to update the
organization information such as name, description, thumbnail, and
featured groups.
Inputs:
updatePortalParamters - parameter.PortalParameters object that holds information to update
clearEmptyFields - boolean t... | [
"The",
"Update",
"operation",
"allows",
"administrators",
"only",
"to",
"update",
"the",
"organization",
"information",
"such",
"as",
"name",
"description",
"thumbnail",
"and",
"featured",
"groups",
"."
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageorg/_portals.py#L1118-L1146 |
13,044 | Esri/ArcREST | src/arcrest/manageorg/_portals.py | Portal.updateUserRole | def updateUserRole(self,
user,
role):
"""
The Update User Role operation allows the administrator of an org
anization to update the role of a user within a portal.
Inputs:
role - Sets the user's role.
Roles are t... | python | def updateUserRole(self,
user,
role):
"""
The Update User Role operation allows the administrator of an org
anization to update the role of a user within a portal.
Inputs:
role - Sets the user's role.
Roles are t... | [
"def",
"updateUserRole",
"(",
"self",
",",
"user",
",",
"role",
")",
":",
"url",
"=",
"self",
".",
"_url",
"+",
"\"/updateuserrole\"",
"params",
"=",
"{",
"\"f\"",
":",
"\"json\"",
",",
"\"user\"",
":",
"user",
",",
"\"role\"",
":",
"role",
"}",
"retur... | The Update User Role operation allows the administrator of an org
anization to update the role of a user within a portal.
Inputs:
role - Sets the user's role.
Roles are the following:
org_user - Ability to add items, create groups, and
... | [
"The",
"Update",
"User",
"Role",
"operation",
"allows",
"the",
"administrator",
"of",
"an",
"org",
"anization",
"to",
"update",
"the",
"role",
"of",
"a",
"user",
"within",
"a",
"portal",
"."
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageorg/_portals.py#L1148-L1180 |
13,045 | Esri/ArcREST | src/arcrest/manageorg/_portals.py | Portal.isServiceNameAvailable | def isServiceNameAvailable(self,
name,
serviceType):
"""
Checks to see if a given service name and type are available for
publishing a new service. true indicates that the name and type is
not found in the organization's servi... | python | def isServiceNameAvailable(self,
name,
serviceType):
"""
Checks to see if a given service name and type are available for
publishing a new service. true indicates that the name and type is
not found in the organization's servi... | [
"def",
"isServiceNameAvailable",
"(",
"self",
",",
"name",
",",
"serviceType",
")",
":",
"_allowedTypes",
"=",
"[",
"'Feature Service'",
",",
"\"Map Service\"",
"]",
"url",
"=",
"self",
".",
"_url",
"+",
"\"/isServiceNameAvailable\"",
"params",
"=",
"{",
"\"f\""... | Checks to see if a given service name and type are available for
publishing a new service. true indicates that the name and type is
not found in the organization's services and is available for
publishing. false means the requested name and type are not available.
Inputs:
nam... | [
"Checks",
"to",
"see",
"if",
"a",
"given",
"service",
"name",
"and",
"type",
"are",
"available",
"for",
"publishing",
"a",
"new",
"service",
".",
"true",
"indicates",
"that",
"the",
"name",
"and",
"type",
"is",
"not",
"found",
"in",
"the",
"organization",
... | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageorg/_portals.py#L1201-L1226 |
13,046 | Esri/ArcREST | src/arcrest/manageorg/_portals.py | Portal.servers | def servers(self):
"""gets the federated or registered servers for Portal"""
url = "%s/servers" % self.root
return Servers(url=url,
securityHandler=self._securityHandler,
proxy_url=self._proxy_url,
proxy_port=self._proxy_port) | python | def servers(self):
"""gets the federated or registered servers for Portal"""
url = "%s/servers" % self.root
return Servers(url=url,
securityHandler=self._securityHandler,
proxy_url=self._proxy_url,
proxy_port=self._proxy_port) | [
"def",
"servers",
"(",
"self",
")",
":",
"url",
"=",
"\"%s/servers\"",
"%",
"self",
".",
"root",
"return",
"Servers",
"(",
"url",
"=",
"url",
",",
"securityHandler",
"=",
"self",
".",
"_securityHandler",
",",
"proxy_url",
"=",
"self",
".",
"_proxy_url",
... | gets the federated or registered servers for Portal | [
"gets",
"the",
"federated",
"or",
"registered",
"servers",
"for",
"Portal"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageorg/_portals.py#L1229-L1235 |
13,047 | Esri/ArcREST | src/arcrest/manageorg/_portals.py | Portal.users | def users(self,
start=1,
num=10,
sortField="fullName",
sortOrder="asc",
role=None):
"""
Lists all the members of the organization. The start and num paging
parameters are supported.
Inputs:
start - The numb... | python | def users(self,
start=1,
num=10,
sortField="fullName",
sortOrder="asc",
role=None):
"""
Lists all the members of the organization. The start and num paging
parameters are supported.
Inputs:
start - The numb... | [
"def",
"users",
"(",
"self",
",",
"start",
"=",
"1",
",",
"num",
"=",
"10",
",",
"sortField",
"=",
"\"fullName\"",
",",
"sortOrder",
"=",
"\"asc\"",
",",
"role",
"=",
"None",
")",
":",
"users",
"=",
"[",
"]",
"url",
"=",
"self",
".",
"_url",
"+",... | Lists all the members of the organization. The start and num paging
parameters are supported.
Inputs:
start - The number of the first entry in the result set response.
The index number is 1-based.
The default value of start is 1 (that is, the first
... | [
"Lists",
"all",
"the",
"members",
"of",
"the",
"organization",
".",
"The",
"start",
"and",
"num",
"paging",
"parameters",
"are",
"supported",
"."
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageorg/_portals.py#L1267-L1334 |
13,048 | Esri/ArcREST | src/arcrest/manageorg/_portals.py | Portal.roles | def roles(self):
"""gets the roles class that allows admins to manage custom roles
on portal"""
return Roles(url="%s/roles" % self.root,
securityHandler=self._securityHandler,
proxy_url=self._proxy_url,
proxy_port=self._proxy_port) | python | def roles(self):
"""gets the roles class that allows admins to manage custom roles
on portal"""
return Roles(url="%s/roles" % self.root,
securityHandler=self._securityHandler,
proxy_url=self._proxy_url,
proxy_port=self._proxy_port) | [
"def",
"roles",
"(",
"self",
")",
":",
"return",
"Roles",
"(",
"url",
"=",
"\"%s/roles\"",
"%",
"self",
".",
"root",
",",
"securityHandler",
"=",
"self",
".",
"_securityHandler",
",",
"proxy_url",
"=",
"self",
".",
"_proxy_url",
",",
"proxy_port",
"=",
"... | gets the roles class that allows admins to manage custom roles
on portal | [
"gets",
"the",
"roles",
"class",
"that",
"allows",
"admins",
"to",
"manage",
"custom",
"roles",
"on",
"portal"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageorg/_portals.py#L1359-L1365 |
13,049 | Esri/ArcREST | src/arcrest/manageorg/_portals.py | Portal.resources | def resources(self,
start=1,
num=10):
"""
Resources lists all file resources for the organization. The start
and num paging parameters are supported.
Inputs:
start - the number of the first entry in the result set response
... | python | def resources(self,
start=1,
num=10):
"""
Resources lists all file resources for the organization. The start
and num paging parameters are supported.
Inputs:
start - the number of the first entry in the result set response
... | [
"def",
"resources",
"(",
"self",
",",
"start",
"=",
"1",
",",
"num",
"=",
"10",
")",
":",
"url",
"=",
"self",
".",
"_url",
"+",
"\"/resources\"",
"params",
"=",
"{",
"\"f\"",
":",
"\"json\"",
",",
"\"start\"",
":",
"start",
",",
"\"num\"",
":",
"nu... | Resources lists all file resources for the organization. The start
and num paging parameters are supported.
Inputs:
start - the number of the first entry in the result set response
The index number is 1-based and the default is 1
num - the maximum number of resu... | [
"Resources",
"lists",
"all",
"file",
"resources",
"for",
"the",
"organization",
".",
"The",
"start",
"and",
"num",
"paging",
"parameters",
"are",
"supported",
"."
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageorg/_portals.py#L1410-L1432 |
13,050 | Esri/ArcREST | src/arcrest/manageorg/_portals.py | Portal.addResource | def addResource(self, key, filePath, text):
"""
The add resource operation allows the administrator to add a file
resource, for example, the organization's logo or custom banner.
The resource can be used by any member of the organization. File
resources use storage space from you... | python | def addResource(self, key, filePath, text):
"""
The add resource operation allows the administrator to add a file
resource, for example, the organization's logo or custom banner.
The resource can be used by any member of the organization. File
resources use storage space from you... | [
"def",
"addResource",
"(",
"self",
",",
"key",
",",
"filePath",
",",
"text",
")",
":",
"url",
"=",
"self",
".",
"root",
"+",
"\"/addresource\"",
"params",
"=",
"{",
"\"f\"",
":",
"\"json\"",
",",
"\"token\"",
":",
"self",
".",
"_securityHandler",
".",
... | The add resource operation allows the administrator to add a file
resource, for example, the organization's logo or custom banner.
The resource can be used by any member of the organization. File
resources use storage space from your quota and are scanned for
viruses.
Inputs:
... | [
"The",
"add",
"resource",
"operation",
"allows",
"the",
"administrator",
"to",
"add",
"a",
"file",
"resource",
"for",
"example",
"the",
"organization",
"s",
"logo",
"or",
"custom",
"banner",
".",
"The",
"resource",
"can",
"be",
"used",
"by",
"any",
"member",... | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageorg/_portals.py#L1434-L1464 |
13,051 | Esri/ArcREST | src/arcrest/manageorg/_portals.py | Portal.updateSecurityPolicy | def updateSecurityPolicy(self,
minLength=8,
minUpper=None,
minLower=None,
minLetter=None,
minDigit=None,
minOther=None,
... | python | def updateSecurityPolicy(self,
minLength=8,
minUpper=None,
minLower=None,
minLetter=None,
minDigit=None,
minOther=None,
... | [
"def",
"updateSecurityPolicy",
"(",
"self",
",",
"minLength",
"=",
"8",
",",
"minUpper",
"=",
"None",
",",
"minLower",
"=",
"None",
",",
"minLetter",
"=",
"None",
",",
"minDigit",
"=",
"None",
",",
"minOther",
"=",
"None",
",",
"expirationInDays",
"=",
"... | updates the Portals security policy | [
"updates",
"the",
"Portals",
"security",
"policy"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageorg/_portals.py#L1506-L1532 |
13,052 | Esri/ArcREST | src/arcrest/manageorg/_portals.py | Portal.portalAdmin | def portalAdmin(self):
"""gets a reference to a portal administration class"""
from ..manageportal import PortalAdministration
return PortalAdministration(admin_url="https://%s/portaladmin" % self.portalHostname,
securityHandler=self._securityHandler,
... | python | def portalAdmin(self):
"""gets a reference to a portal administration class"""
from ..manageportal import PortalAdministration
return PortalAdministration(admin_url="https://%s/portaladmin" % self.portalHostname,
securityHandler=self._securityHandler,
... | [
"def",
"portalAdmin",
"(",
"self",
")",
":",
"from",
".",
".",
"manageportal",
"import",
"PortalAdministration",
"return",
"PortalAdministration",
"(",
"admin_url",
"=",
"\"https://%s/portaladmin\"",
"%",
"self",
".",
"portalHostname",
",",
"securityHandler",
"=",
"... | gets a reference to a portal administration class | [
"gets",
"a",
"reference",
"to",
"a",
"portal",
"administration",
"class"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageorg/_portals.py#L1536-L1543 |
13,053 | Esri/ArcREST | src/arcrest/manageorg/_portals.py | Portal.addUser | def addUser(self, invitationList,
subject, html):
"""
adds a user without sending an invitation email
Inputs:
invitationList - InvitationList class used to add users without
sending an email
subject - email subject
html - email messag... | python | def addUser(self, invitationList,
subject, html):
"""
adds a user without sending an invitation email
Inputs:
invitationList - InvitationList class used to add users without
sending an email
subject - email subject
html - email messag... | [
"def",
"addUser",
"(",
"self",
",",
"invitationList",
",",
"subject",
",",
"html",
")",
":",
"url",
"=",
"self",
".",
"_url",
"+",
"\"/invite\"",
"params",
"=",
"{",
"\"f\"",
":",
"\"json\"",
"}",
"if",
"isinstance",
"(",
"invitationList",
",",
"paramete... | adds a user without sending an invitation email
Inputs:
invitationList - InvitationList class used to add users without
sending an email
subject - email subject
html - email message sent to users in invitation list object | [
"adds",
"a",
"user",
"without",
"sending",
"an",
"invitation",
"email"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageorg/_portals.py#L1545-L1566 |
13,054 | Esri/ArcREST | src/arcrest/manageorg/_portals.py | Portal.inviteByEmail | def inviteByEmail(self,
emails,
subject,
text,
html,
role="org_user",
mustApprove=True,
expiration=1440):
"""Invites a user or users to a site.
Inputs:
emails ... | python | def inviteByEmail(self,
emails,
subject,
text,
html,
role="org_user",
mustApprove=True,
expiration=1440):
"""Invites a user or users to a site.
Inputs:
emails ... | [
"def",
"inviteByEmail",
"(",
"self",
",",
"emails",
",",
"subject",
",",
"text",
",",
"html",
",",
"role",
"=",
"\"org_user\"",
",",
"mustApprove",
"=",
"True",
",",
"expiration",
"=",
"1440",
")",
":",
"url",
"=",
"self",
".",
"root",
"+",
"\"/inviteB... | Invites a user or users to a site.
Inputs:
emails - comma seperated list of emails
subject - title of email
text - email text
html - email text in html
role - site role (can't be administrator)
mustApprove - verifies if user that is join must be... | [
"Invites",
"a",
"user",
"or",
"users",
"to",
"a",
"site",
"."
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageorg/_portals.py#L1568-L1602 |
13,055 | Esri/ArcREST | src/arcrest/manageorg/_portals.py | Portal.usage | def usage(self, startTime, endTime, vars=None, period=None,
groupby=None, name=None, stype=None, etype=None,
appId=None, deviceId=None, username=None, appOrgId=None,
userOrgId=None, hostOrgId=None):
"""
returns the usage statistics value
"""
url... | python | def usage(self, startTime, endTime, vars=None, period=None,
groupby=None, name=None, stype=None, etype=None,
appId=None, deviceId=None, username=None, appOrgId=None,
userOrgId=None, hostOrgId=None):
"""
returns the usage statistics value
"""
url... | [
"def",
"usage",
"(",
"self",
",",
"startTime",
",",
"endTime",
",",
"vars",
"=",
"None",
",",
"period",
"=",
"None",
",",
"groupby",
"=",
"None",
",",
"name",
"=",
"None",
",",
"stype",
"=",
"None",
",",
"etype",
"=",
"None",
",",
"appId",
"=",
"... | returns the usage statistics value | [
"returns",
"the",
"usage",
"statistics",
"value"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageorg/_portals.py#L1615-L1650 |
13,056 | Esri/ArcREST | src/arcrest/manageorg/_portals.py | Servers.servers | def servers(self):
"""gets all the server resources"""
self.__init()
items = []
for k,v in self._json_dict.items():
if k == "servers":
for s in v:
if 'id' in s:
url = "%s/%s" % (self.root, s['id'])
... | python | def servers(self):
"""gets all the server resources"""
self.__init()
items = []
for k,v in self._json_dict.items():
if k == "servers":
for s in v:
if 'id' in s:
url = "%s/%s" % (self.root, s['id'])
... | [
"def",
"servers",
"(",
"self",
")",
":",
"self",
".",
"__init",
"(",
")",
"items",
"=",
"[",
"]",
"for",
"k",
",",
"v",
"in",
"self",
".",
"_json_dict",
".",
"items",
"(",
")",
":",
"if",
"k",
"==",
"\"servers\"",
":",
"for",
"s",
"in",
"v",
... | gets all the server resources | [
"gets",
"all",
"the",
"server",
"resources"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageorg/_portals.py#L1976-L1991 |
13,057 | Esri/ArcREST | src/arcrest/manageorg/_portals.py | Roles.deleteRole | def deleteRole(self, roleID):
"""
deletes a role by ID
"""
url = self._url + "/%s/delete" % roleID
params = {
"f" : "json"
}
return self._post(url=url,
param_dict=params,
proxy_url=self._proxy_... | python | def deleteRole(self, roleID):
"""
deletes a role by ID
"""
url = self._url + "/%s/delete" % roleID
params = {
"f" : "json"
}
return self._post(url=url,
param_dict=params,
proxy_url=self._proxy_... | [
"def",
"deleteRole",
"(",
"self",
",",
"roleID",
")",
":",
"url",
"=",
"self",
".",
"_url",
"+",
"\"/%s/delete\"",
"%",
"roleID",
"params",
"=",
"{",
"\"f\"",
":",
"\"json\"",
"}",
"return",
"self",
".",
"_post",
"(",
"url",
"=",
"url",
",",
"param_d... | deletes a role by ID | [
"deletes",
"a",
"role",
"by",
"ID"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageorg/_portals.py#L2059-L2071 |
13,058 | Esri/ArcREST | src/arcrest/manageorg/_portals.py | Roles.updateRole | def updateRole(self, roleID, name, description):
"""allows for the role name or description to be modified"""
params = {
"name" : name,
"description" : description,
"f" : "json"
}
url = self._url + "/%s/update"
return self._post(url=url,
... | python | def updateRole(self, roleID, name, description):
"""allows for the role name or description to be modified"""
params = {
"name" : name,
"description" : description,
"f" : "json"
}
url = self._url + "/%s/update"
return self._post(url=url,
... | [
"def",
"updateRole",
"(",
"self",
",",
"roleID",
",",
"name",
",",
"description",
")",
":",
"params",
"=",
"{",
"\"name\"",
":",
"name",
",",
"\"description\"",
":",
"description",
",",
"\"f\"",
":",
"\"json\"",
"}",
"url",
"=",
"self",
".",
"_url",
"+... | allows for the role name or description to be modified | [
"allows",
"for",
"the",
"role",
"name",
"or",
"description",
"to",
"be",
"modified"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageorg/_portals.py#L2073-L2084 |
13,059 | Esri/ArcREST | src/arcrest/manageorg/_portals.py | Roles.findRoleID | def findRoleID(self, name):
"""searches the roles by name and returns the role's ID"""
for r in self:
if r['name'].lower() == name.lower():
return r['id']
del r
return None | python | def findRoleID(self, name):
"""searches the roles by name and returns the role's ID"""
for r in self:
if r['name'].lower() == name.lower():
return r['id']
del r
return None | [
"def",
"findRoleID",
"(",
"self",
",",
"name",
")",
":",
"for",
"r",
"in",
"self",
":",
"if",
"r",
"[",
"'name'",
"]",
".",
"lower",
"(",
")",
"==",
"name",
".",
"lower",
"(",
")",
":",
"return",
"r",
"[",
"'id'",
"]",
"del",
"r",
"return",
"... | searches the roles by name and returns the role's ID | [
"searches",
"the",
"roles",
"by",
"name",
"and",
"returns",
"the",
"role",
"s",
"ID"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageorg/_portals.py#L2096-L2102 |
13,060 | Esri/ArcREST | tools/src/addUser.py | get_config_value | def get_config_value(config_file, section, variable):
""" extracts a config file value """
try:
parser = ConfigParser.SafeConfigParser()
parser.read(config_file)
return parser.get(section, variable)
except:
return None | python | def get_config_value(config_file, section, variable):
""" extracts a config file value """
try:
parser = ConfigParser.SafeConfigParser()
parser.read(config_file)
return parser.get(section, variable)
except:
return None | [
"def",
"get_config_value",
"(",
"config_file",
",",
"section",
",",
"variable",
")",
":",
"try",
":",
"parser",
"=",
"ConfigParser",
".",
"SafeConfigParser",
"(",
")",
"parser",
".",
"read",
"(",
"config_file",
")",
"return",
"parser",
".",
"get",
"(",
"se... | extracts a config file value | [
"extracts",
"a",
"config",
"file",
"value"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/tools/src/addUser.py#L38-L45 |
13,061 | Esri/ArcREST | src/arcrest/manageorg/_content.py | Content.users | def users(self):
"""
Provides access to all user resources
"""
return Users(url="%s/users" % self.root,
securityHandler=self._securityHandler,
proxy_url=self._proxy_url,
proxy_port=self._proxy_port) | python | def users(self):
"""
Provides access to all user resources
"""
return Users(url="%s/users" % self.root,
securityHandler=self._securityHandler,
proxy_url=self._proxy_url,
proxy_port=self._proxy_port) | [
"def",
"users",
"(",
"self",
")",
":",
"return",
"Users",
"(",
"url",
"=",
"\"%s/users\"",
"%",
"self",
".",
"root",
",",
"securityHandler",
"=",
"self",
".",
"_securityHandler",
",",
"proxy_url",
"=",
"self",
".",
"_proxy_url",
",",
"proxy_port",
"=",
"... | Provides access to all user resources | [
"Provides",
"access",
"to",
"all",
"user",
"resources"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageorg/_content.py#L62-L69 |
13,062 | Esri/ArcREST | src/arcrest/manageorg/_content.py | Content.getItem | def getItem(self, itemId):
"""gets the refernce to the Items class which manages content on a
given AGOL or Portal site.
"""
url = "%s/items/%s" % (self.root, itemId)
return Item(url=url,
securityHandler=self._securityHandler,
proxy_url=sel... | python | def getItem(self, itemId):
"""gets the refernce to the Items class which manages content on a
given AGOL or Portal site.
"""
url = "%s/items/%s" % (self.root, itemId)
return Item(url=url,
securityHandler=self._securityHandler,
proxy_url=sel... | [
"def",
"getItem",
"(",
"self",
",",
"itemId",
")",
":",
"url",
"=",
"\"%s/items/%s\"",
"%",
"(",
"self",
".",
"root",
",",
"itemId",
")",
"return",
"Item",
"(",
"url",
"=",
"url",
",",
"securityHandler",
"=",
"self",
".",
"_securityHandler",
",",
"prox... | gets the refernce to the Items class which manages content on a
given AGOL or Portal site. | [
"gets",
"the",
"refernce",
"to",
"the",
"Items",
"class",
"which",
"manages",
"content",
"on",
"a",
"given",
"AGOL",
"or",
"Portal",
"site",
"."
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageorg/_content.py#L71-L79 |
13,063 | Esri/ArcREST | src/arcrest/manageorg/_content.py | Content.FeatureContent | def FeatureContent(self):
"""Feature Content class id the parent resource for feature
operations such as Analyze and Generate."""
return FeatureContent(url="%s/%s" % (self.root, "features"),
securityHandler=self._securityHandler,
proxy_... | python | def FeatureContent(self):
"""Feature Content class id the parent resource for feature
operations such as Analyze and Generate."""
return FeatureContent(url="%s/%s" % (self.root, "features"),
securityHandler=self._securityHandler,
proxy_... | [
"def",
"FeatureContent",
"(",
"self",
")",
":",
"return",
"FeatureContent",
"(",
"url",
"=",
"\"%s/%s\"",
"%",
"(",
"self",
".",
"root",
",",
"\"features\"",
")",
",",
"securityHandler",
"=",
"self",
".",
"_securityHandler",
",",
"proxy_url",
"=",
"self",
... | Feature Content class id the parent resource for feature
operations such as Analyze and Generate. | [
"Feature",
"Content",
"class",
"id",
"the",
"parent",
"resource",
"for",
"feature",
"operations",
"such",
"as",
"Analyze",
"and",
"Generate",
"."
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageorg/_content.py#L82-L88 |
13,064 | Esri/ArcREST | src/arcrest/manageorg/_content.py | Users.user | def user(self, username=None):
"""gets the user's content. If None is passed, the current user is
used.
Input:
username - name of the login for a given user on a site.
"""
if username is None:
username = self.__getUsername()
url = "%s/%s" % (self.r... | python | def user(self, username=None):
"""gets the user's content. If None is passed, the current user is
used.
Input:
username - name of the login for a given user on a site.
"""
if username is None:
username = self.__getUsername()
url = "%s/%s" % (self.r... | [
"def",
"user",
"(",
"self",
",",
"username",
"=",
"None",
")",
":",
"if",
"username",
"is",
"None",
":",
"username",
"=",
"self",
".",
"__getUsername",
"(",
")",
"url",
"=",
"\"%s/%s\"",
"%",
"(",
"self",
".",
"root",
",",
"username",
")",
"return",
... | gets the user's content. If None is passed, the current user is
used.
Input:
username - name of the login for a given user on a site. | [
"gets",
"the",
"user",
"s",
"content",
".",
"If",
"None",
"is",
"passed",
"the",
"current",
"user",
"is",
"used",
"."
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageorg/_content.py#L182-L197 |
13,065 | Esri/ArcREST | src/arcrest/manageorg/_content.py | Item.saveThumbnail | def saveThumbnail(self,fileName,filePath):
""" URL to the thumbnail used for the item """
if self._thumbnail is None:
self.__init()
param_dict = {}
if self._thumbnail is not None:
imgUrl = self.root + "/info/" + self._thumbnail
onlineFileName, file_ex... | python | def saveThumbnail(self,fileName,filePath):
""" URL to the thumbnail used for the item """
if self._thumbnail is None:
self.__init()
param_dict = {}
if self._thumbnail is not None:
imgUrl = self.root + "/info/" + self._thumbnail
onlineFileName, file_ex... | [
"def",
"saveThumbnail",
"(",
"self",
",",
"fileName",
",",
"filePath",
")",
":",
"if",
"self",
".",
"_thumbnail",
"is",
"None",
":",
"self",
".",
"__init",
"(",
")",
"param_dict",
"=",
"{",
"}",
"if",
"self",
".",
"_thumbnail",
"is",
"not",
"None",
"... | URL to the thumbnail used for the item | [
"URL",
"to",
"the",
"thumbnail",
"used",
"for",
"the",
"item"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageorg/_content.py#L501-L519 |
13,066 | Esri/ArcREST | src/arcrest/manageorg/_content.py | Item.userItem | def userItem(self):
"""returns a reference to the UserItem class"""
if self.ownerFolder is not None:
url = "%s/users/%s/%s/items/%s" % (self.root.split('/items/')[0], self.owner,self.ownerFolder, self.id)
else:
url = "%s/users/%s/items/%s" % (self.root.split('/items/')[0]... | python | def userItem(self):
"""returns a reference to the UserItem class"""
if self.ownerFolder is not None:
url = "%s/users/%s/%s/items/%s" % (self.root.split('/items/')[0], self.owner,self.ownerFolder, self.id)
else:
url = "%s/users/%s/items/%s" % (self.root.split('/items/')[0]... | [
"def",
"userItem",
"(",
"self",
")",
":",
"if",
"self",
".",
"ownerFolder",
"is",
"not",
"None",
":",
"url",
"=",
"\"%s/users/%s/%s/items/%s\"",
"%",
"(",
"self",
".",
"root",
".",
"split",
"(",
"'/items/'",
")",
"[",
"0",
"]",
",",
"self",
".",
"own... | returns a reference to the UserItem class | [
"returns",
"a",
"reference",
"to",
"the",
"UserItem",
"class"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageorg/_content.py#L675-L684 |
13,067 | Esri/ArcREST | src/arcrest/manageorg/_content.py | Item.addRating | def addRating(self, rating=5.0):
"""Adds a rating to an item between 1.0 and 5.0"""
if rating > 5.0:
rating = 5.0
elif rating < 1.0:
rating = 1.0
url = "%s/addRating" % self.root
params = {
"f": "json",
"rating" : "%s" % rating
... | python | def addRating(self, rating=5.0):
"""Adds a rating to an item between 1.0 and 5.0"""
if rating > 5.0:
rating = 5.0
elif rating < 1.0:
rating = 1.0
url = "%s/addRating" % self.root
params = {
"f": "json",
"rating" : "%s" % rating
... | [
"def",
"addRating",
"(",
"self",
",",
"rating",
"=",
"5.0",
")",
":",
"if",
"rating",
">",
"5.0",
":",
"rating",
"=",
"5.0",
"elif",
"rating",
"<",
"1.0",
":",
"rating",
"=",
"1.0",
"url",
"=",
"\"%s/addRating\"",
"%",
"self",
".",
"root",
"params",
... | Adds a rating to an item between 1.0 and 5.0 | [
"Adds",
"a",
"rating",
"to",
"an",
"item",
"between",
"1",
".",
"0",
"and",
"5",
".",
"0"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageorg/_content.py#L781-L796 |
13,068 | Esri/ArcREST | src/arcrest/manageorg/_content.py | Item.addComment | def addComment(self, comment):
""" adds a comment to a given item. Must be authenticated """
url = "%s/addComment" % self.root
params = {
"f" : "json",
"comment" : comment
}
return self._post(url, params, proxy_port=self._proxy_port,
... | python | def addComment(self, comment):
""" adds a comment to a given item. Must be authenticated """
url = "%s/addComment" % self.root
params = {
"f" : "json",
"comment" : comment
}
return self._post(url, params, proxy_port=self._proxy_port,
... | [
"def",
"addComment",
"(",
"self",
",",
"comment",
")",
":",
"url",
"=",
"\"%s/addComment\"",
"%",
"self",
".",
"root",
"params",
"=",
"{",
"\"f\"",
":",
"\"json\"",
",",
"\"comment\"",
":",
"comment",
"}",
"return",
"self",
".",
"_post",
"(",
"url",
",... | adds a comment to a given item. Must be authenticated | [
"adds",
"a",
"comment",
"to",
"a",
"given",
"item",
".",
"Must",
"be",
"authenticated"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageorg/_content.py#L811-L820 |
13,069 | Esri/ArcREST | src/arcrest/manageorg/_content.py | Item.itemComment | def itemComment(self, commentId):
""" returns details of a single comment """
url = "%s/comments/%s" % (self.root, commentId)
params = {
"f": "json"
}
return self._get(url,
params,
securityHandler=self._securityH... | python | def itemComment(self, commentId):
""" returns details of a single comment """
url = "%s/comments/%s" % (self.root, commentId)
params = {
"f": "json"
}
return self._get(url,
params,
securityHandler=self._securityH... | [
"def",
"itemComment",
"(",
"self",
",",
"commentId",
")",
":",
"url",
"=",
"\"%s/comments/%s\"",
"%",
"(",
"self",
".",
"root",
",",
"commentId",
")",
"params",
"=",
"{",
"\"f\"",
":",
"\"json\"",
"}",
"return",
"self",
".",
"_get",
"(",
"url",
",",
... | returns details of a single comment | [
"returns",
"details",
"of",
"a",
"single",
"comment"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageorg/_content.py#L822-L832 |
13,070 | Esri/ArcREST | src/arcrest/manageorg/_content.py | Item.itemComments | def itemComments(self):
""" returns all comments for a given item """
url = "%s/comments/" % self.root
params = {
"f": "json"
}
return self._get(url,
params,
securityHandler=self._securityHandler,
... | python | def itemComments(self):
""" returns all comments for a given item """
url = "%s/comments/" % self.root
params = {
"f": "json"
}
return self._get(url,
params,
securityHandler=self._securityHandler,
... | [
"def",
"itemComments",
"(",
"self",
")",
":",
"url",
"=",
"\"%s/comments/\"",
"%",
"self",
".",
"root",
"params",
"=",
"{",
"\"f\"",
":",
"\"json\"",
"}",
"return",
"self",
".",
"_get",
"(",
"url",
",",
"params",
",",
"securityHandler",
"=",
"self",
".... | returns all comments for a given item | [
"returns",
"all",
"comments",
"for",
"a",
"given",
"item"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageorg/_content.py#L835-L845 |
13,071 | Esri/ArcREST | src/arcrest/manageorg/_content.py | Item.deleteComment | def deleteComment(self, commentId):
""" removes a comment from an Item
Inputs:
commentId - unique id of comment to remove
"""
url = "%s/comments/%s/delete" % (self.root, commentId)
params = {
"f": "json",
}
return self._post(url,
... | python | def deleteComment(self, commentId):
""" removes a comment from an Item
Inputs:
commentId - unique id of comment to remove
"""
url = "%s/comments/%s/delete" % (self.root, commentId)
params = {
"f": "json",
}
return self._post(url,
... | [
"def",
"deleteComment",
"(",
"self",
",",
"commentId",
")",
":",
"url",
"=",
"\"%s/comments/%s/delete\"",
"%",
"(",
"self",
".",
"root",
",",
"commentId",
")",
"params",
"=",
"{",
"\"f\"",
":",
"\"json\"",
",",
"}",
"return",
"self",
".",
"_post",
"(",
... | removes a comment from an Item
Inputs:
commentId - unique id of comment to remove | [
"removes",
"a",
"comment",
"from",
"an",
"Item"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageorg/_content.py#L847-L861 |
13,072 | Esri/ArcREST | src/arcrest/manageorg/_content.py | Item.packageInfo | def packageInfo(self):
"""gets the item's package information file"""
url = "%s/item.pkinfo" % self.root
params = {'f' : 'json'}
result = self._get(url=url,
param_dict=params,
securityHandler=self._securityHandler,
... | python | def packageInfo(self):
"""gets the item's package information file"""
url = "%s/item.pkinfo" % self.root
params = {'f' : 'json'}
result = self._get(url=url,
param_dict=params,
securityHandler=self._securityHandler,
... | [
"def",
"packageInfo",
"(",
"self",
")",
":",
"url",
"=",
"\"%s/item.pkinfo\"",
"%",
"self",
".",
"root",
"params",
"=",
"{",
"'f'",
":",
"'json'",
"}",
"result",
"=",
"self",
".",
"_get",
"(",
"url",
"=",
"url",
",",
"param_dict",
"=",
"params",
",",... | gets the item's package information file | [
"gets",
"the",
"item",
"s",
"package",
"information",
"file"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageorg/_content.py#L936-L946 |
13,073 | Esri/ArcREST | src/arcrest/manageorg/_content.py | UserItem.item | def item(self):
"""returns the Item class of an Item"""
url = self._contentURL
return Item(url=self._contentURL,
securityHandler=self._securityHandler,
proxy_url=self._proxy_url,
proxy_port=self._proxy_port,
initaliz... | python | def item(self):
"""returns the Item class of an Item"""
url = self._contentURL
return Item(url=self._contentURL,
securityHandler=self._securityHandler,
proxy_url=self._proxy_url,
proxy_port=self._proxy_port,
initaliz... | [
"def",
"item",
"(",
"self",
")",
":",
"url",
"=",
"self",
".",
"_contentURL",
"return",
"Item",
"(",
"url",
"=",
"self",
".",
"_contentURL",
",",
"securityHandler",
"=",
"self",
".",
"_securityHandler",
",",
"proxy_url",
"=",
"self",
".",
"_proxy_url",
"... | returns the Item class of an Item | [
"returns",
"the",
"Item",
"class",
"of",
"an",
"Item"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageorg/_content.py#L1478-L1485 |
13,074 | Esri/ArcREST | src/arcrest/manageorg/_content.py | UserItem.reassignItem | def reassignItem(self,
targetUsername,
targetFoldername):
"""
The Reassign Item operation allows the administrator of an
organization to reassign a member's item to another member of the
organization.
Inputs:
targetUsername - ... | python | def reassignItem(self,
targetUsername,
targetFoldername):
"""
The Reassign Item operation allows the administrator of an
organization to reassign a member's item to another member of the
organization.
Inputs:
targetUsername - ... | [
"def",
"reassignItem",
"(",
"self",
",",
"targetUsername",
",",
"targetFoldername",
")",
":",
"params",
"=",
"{",
"\"f\"",
":",
"\"json\"",
",",
"\"targetUsername\"",
":",
"targetUsername",
",",
"\"targetFoldername\"",
":",
"targetFoldername",
"}",
"url",
"=",
"... | The Reassign Item operation allows the administrator of an
organization to reassign a member's item to another member of the
organization.
Inputs:
targetUsername - The target username of the new owner of the
item
targetFoldername - The destinati... | [
"The",
"Reassign",
"Item",
"operation",
"allows",
"the",
"administrator",
"of",
"an",
"organization",
"to",
"reassign",
"a",
"member",
"s",
"item",
"to",
"another",
"member",
"of",
"the",
"organization",
"."
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageorg/_content.py#L1576-L1604 |
13,075 | Esri/ArcREST | src/arcrest/manageorg/_content.py | UserItem.updateItem | def updateItem(self,
itemParameters,
clearEmptyFields=False,
data=None,
metadata=None,
text=None,
serviceUrl=None,
multipart=False):
"""
updates an item's properties using... | python | def updateItem(self,
itemParameters,
clearEmptyFields=False,
data=None,
metadata=None,
text=None,
serviceUrl=None,
multipart=False):
"""
updates an item's properties using... | [
"def",
"updateItem",
"(",
"self",
",",
"itemParameters",
",",
"clearEmptyFields",
"=",
"False",
",",
"data",
"=",
"None",
",",
"metadata",
"=",
"None",
",",
"text",
"=",
"None",
",",
"serviceUrl",
"=",
"None",
",",
"multipart",
"=",
"False",
")",
":",
... | updates an item's properties using the ItemParameter class.
Inputs:
itemParameters - property class to update
clearEmptyFields - boolean, cleans up empty values
data - updates the file property of the service like a .sd file
metadata - this is an xml file that contai... | [
"updates",
"an",
"item",
"s",
"properties",
"using",
"the",
"ItemParameter",
"class",
"."
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageorg/_content.py#L1674-L1763 |
13,076 | Esri/ArcREST | src/arcrest/manageorg/_content.py | UserItem.status | def status(self, jobId=None, jobType=None):
"""
Inquire about status when publishing an item, adding an item in
async mode, or adding with a multipart upload. "Partial" is
available for Add Item Multipart, when only a part is uploaded
and the item is not committed.
... | python | def status(self, jobId=None, jobType=None):
"""
Inquire about status when publishing an item, adding an item in
async mode, or adding with a multipart upload. "Partial" is
available for Add Item Multipart, when only a part is uploaded
and the item is not committed.
... | [
"def",
"status",
"(",
"self",
",",
"jobId",
"=",
"None",
",",
"jobType",
"=",
"None",
")",
":",
"params",
"=",
"{",
"\"f\"",
":",
"\"json\"",
"}",
"if",
"jobType",
"is",
"not",
"None",
":",
"params",
"[",
"'jobType'",
"]",
"=",
"jobType",
"if",
"jo... | Inquire about status when publishing an item, adding an item in
async mode, or adding with a multipart upload. "Partial" is
available for Add Item Multipart, when only a part is uploaded
and the item is not committed.
Input:
jobType The type of asynchronous job... | [
"Inquire",
"about",
"status",
"when",
"publishing",
"an",
"item",
"adding",
"an",
"item",
"in",
"async",
"mode",
"or",
"adding",
"with",
"a",
"multipart",
"upload",
".",
"Partial",
"is",
"available",
"for",
"Add",
"Item",
"Multipart",
"when",
"only",
"a",
... | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageorg/_content.py#L1784-L1813 |
13,077 | Esri/ArcREST | src/arcrest/manageorg/_content.py | UserItem.commit | def commit(self, wait=False, additionalParams={}):
"""
Commit is called once all parts are uploaded during a multipart Add
Item or Update Item operation. The parts are combined into a file,
and the original file is overwritten during an Update Item
operation. This is an asynchron... | python | def commit(self, wait=False, additionalParams={}):
"""
Commit is called once all parts are uploaded during a multipart Add
Item or Update Item operation. The parts are combined into a file,
and the original file is overwritten during an Update Item
operation. This is an asynchron... | [
"def",
"commit",
"(",
"self",
",",
"wait",
"=",
"False",
",",
"additionalParams",
"=",
"{",
"}",
")",
":",
"url",
"=",
"\"%s/commit\"",
"%",
"self",
".",
"root",
"params",
"=",
"{",
"\"f\"",
":",
"\"json\"",
",",
"}",
"for",
"key",
",",
"value",
"i... | Commit is called once all parts are uploaded during a multipart Add
Item or Update Item operation. The parts are combined into a file,
and the original file is overwritten during an Update Item
operation. This is an asynchronous call and returns immediately.
Status can be used to check t... | [
"Commit",
"is",
"called",
"once",
"all",
"parts",
"are",
"uploaded",
"during",
"a",
"multipart",
"Add",
"Item",
"or",
"Update",
"Item",
"operation",
".",
"The",
"parts",
"are",
"combined",
"into",
"a",
"file",
"and",
"the",
"original",
"file",
"is",
"overw... | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageorg/_content.py#L1827-L1868 |
13,078 | Esri/ArcREST | src/arcrest/manageorg/_content.py | User.folders | def folders(self):
'''gets the property value for folders'''
if self._folders is None :
self.__init()
if self._folders is not None and isinstance(self._folders, list):
if len(self._folders) == 0:
self._loadFolders()
return self._folders | python | def folders(self):
'''gets the property value for folders'''
if self._folders is None :
self.__init()
if self._folders is not None and isinstance(self._folders, list):
if len(self._folders) == 0:
self._loadFolders()
return self._folders | [
"def",
"folders",
"(",
"self",
")",
":",
"if",
"self",
".",
"_folders",
"is",
"None",
":",
"self",
".",
"__init",
"(",
")",
"if",
"self",
".",
"_folders",
"is",
"not",
"None",
"and",
"isinstance",
"(",
"self",
".",
"_folders",
",",
"list",
")",
":"... | gets the property value for folders | [
"gets",
"the",
"property",
"value",
"for",
"folders"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageorg/_content.py#L2146-L2153 |
13,079 | Esri/ArcREST | src/arcrest/manageorg/_content.py | User.items | def items(self):
'''gets the property value for items'''
self.__init()
items = []
for item in self._items:
items.append(
UserItem(url="%s/items/%s" % (self.location, item['id']),
securityHandler=self._securityHandler,
... | python | def items(self):
'''gets the property value for items'''
self.__init()
items = []
for item in self._items:
items.append(
UserItem(url="%s/items/%s" % (self.location, item['id']),
securityHandler=self._securityHandler,
... | [
"def",
"items",
"(",
"self",
")",
":",
"self",
".",
"__init",
"(",
")",
"items",
"=",
"[",
"]",
"for",
"item",
"in",
"self",
".",
"_items",
":",
"items",
".",
"append",
"(",
"UserItem",
"(",
"url",
"=",
"\"%s/items/%s\"",
"%",
"(",
"self",
".",
"... | gets the property value for items | [
"gets",
"the",
"property",
"value",
"for",
"items"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageorg/_content.py#L2202-L2214 |
13,080 | Esri/ArcREST | src/arcrest/manageorg/_content.py | User.addRelationship | def addRelationship(self,
originItemId,
destinationItemId,
relationshipType):
"""
Adds a relationship of a certain type between two items.
Inputs:
originItemId - The item ID of the origin item of the
... | python | def addRelationship(self,
originItemId,
destinationItemId,
relationshipType):
"""
Adds a relationship of a certain type between two items.
Inputs:
originItemId - The item ID of the origin item of the
... | [
"def",
"addRelationship",
"(",
"self",
",",
"originItemId",
",",
"destinationItemId",
",",
"relationshipType",
")",
":",
"url",
"=",
"\"%s/addRelationship\"",
"%",
"self",
".",
"root",
"params",
"=",
"{",
"\"originItemId\"",
":",
"originItemId",
",",
"\"destinatio... | Adds a relationship of a certain type between two items.
Inputs:
originItemId - The item ID of the origin item of the
relationship
destinationItemId - The item ID of the destination item of the
relationship.
relationshipT... | [
"Adds",
"a",
"relationship",
"of",
"a",
"certain",
"type",
"between",
"two",
"items",
"."
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageorg/_content.py#L2266-L2292 |
13,081 | Esri/ArcREST | src/arcrest/manageorg/_content.py | User.createService | def createService(self, createServiceParameter,
description=None,
tags="Feature Service",
snippet=None):
"""
The Create Service operation allows users to create a hosted
feature service. You can use the API to create an empty host... | python | def createService(self, createServiceParameter,
description=None,
tags="Feature Service",
snippet=None):
"""
The Create Service operation allows users to create a hosted
feature service. You can use the API to create an empty host... | [
"def",
"createService",
"(",
"self",
",",
"createServiceParameter",
",",
"description",
"=",
"None",
",",
"tags",
"=",
"\"Feature Service\"",
",",
"snippet",
"=",
"None",
")",
":",
"url",
"=",
"\"%s/createService\"",
"%",
"self",
".",
"location",
"val",
"=",
... | The Create Service operation allows users to create a hosted
feature service. You can use the API to create an empty hosted
feaure service from feature service metadata JSON.
Inputs:
createServiceParameter - create service object | [
"The",
"Create",
"Service",
"operation",
"allows",
"users",
"to",
"create",
"a",
"hosted",
"feature",
"service",
".",
"You",
"can",
"use",
"the",
"API",
"to",
"create",
"an",
"empty",
"hosted",
"feaure",
"service",
"from",
"feature",
"service",
"metadata",
"... | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageorg/_content.py#L2515-L2554 |
13,082 | Esri/ArcREST | src/arcrest/manageorg/_content.py | User.shareItems | def shareItems(self, items, groups="", everyone=False,
org=False):
"""
Shares a batch of items with the specified list of groups. Users
can only share items with groups to which they belong. This
operation also allows a user to share items with everyone, in which
... | python | def shareItems(self, items, groups="", everyone=False,
org=False):
"""
Shares a batch of items with the specified list of groups. Users
can only share items with groups to which they belong. This
operation also allows a user to share items with everyone, in which
... | [
"def",
"shareItems",
"(",
"self",
",",
"items",
",",
"groups",
"=",
"\"\"",
",",
"everyone",
"=",
"False",
",",
"org",
"=",
"False",
")",
":",
"url",
"=",
"\"%s/shareItems\"",
"%",
"self",
".",
"root",
"params",
"=",
"{",
"\"f\"",
":",
"\"json\"",
",... | Shares a batch of items with the specified list of groups. Users
can only share items with groups to which they belong. This
operation also allows a user to share items with everyone, in which
case the items are publicly accessible, or with everyone in their
organization.
Inputs... | [
"Shares",
"a",
"batch",
"of",
"items",
"with",
"the",
"specified",
"list",
"of",
"groups",
".",
"Users",
"can",
"only",
"share",
"items",
"with",
"groups",
"to",
"which",
"they",
"belong",
".",
"This",
"operation",
"also",
"allows",
"a",
"user",
"to",
"s... | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageorg/_content.py#L2585-L2612 |
13,083 | Esri/ArcREST | src/arcrest/manageorg/_content.py | User.createFolder | def createFolder(self, name):
"""
Creates a folder in which items can be placed. Folders are only
visible to a user and solely used for organizing content within
that user's content space.
"""
url = "%s/createFolder" % self.root
params = {
"f" : "json"... | python | def createFolder(self, name):
"""
Creates a folder in which items can be placed. Folders are only
visible to a user and solely used for organizing content within
that user's content space.
"""
url = "%s/createFolder" % self.root
params = {
"f" : "json"... | [
"def",
"createFolder",
"(",
"self",
",",
"name",
")",
":",
"url",
"=",
"\"%s/createFolder\"",
"%",
"self",
".",
"root",
"params",
"=",
"{",
"\"f\"",
":",
"\"json\"",
",",
"\"title\"",
":",
"name",
"}",
"self",
".",
"_folders",
"=",
"None",
"return",
"s... | Creates a folder in which items can be placed. Folders are only
visible to a user and solely used for organizing content within
that user's content space. | [
"Creates",
"a",
"folder",
"in",
"which",
"items",
"can",
"be",
"placed",
".",
"Folders",
"are",
"only",
"visible",
"to",
"a",
"user",
"and",
"solely",
"used",
"for",
"organizing",
"content",
"within",
"that",
"user",
"s",
"content",
"space",
"."
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageorg/_content.py#L2674-L2690 |
13,084 | Esri/ArcREST | src/arcrest/manageorg/_content.py | FeatureContent.analyze | def analyze(self,
itemId=None,
filePath=None,
text=None,
fileType="csv",
analyzeParameters=None):
"""
The Analyze call helps a client analyze a CSV file prior to
publishing or generating features using the Publish or... | python | def analyze(self,
itemId=None,
filePath=None,
text=None,
fileType="csv",
analyzeParameters=None):
"""
The Analyze call helps a client analyze a CSV file prior to
publishing or generating features using the Publish or... | [
"def",
"analyze",
"(",
"self",
",",
"itemId",
"=",
"None",
",",
"filePath",
"=",
"None",
",",
"text",
"=",
"None",
",",
"fileType",
"=",
"\"csv\"",
",",
"analyzeParameters",
"=",
"None",
")",
":",
"files",
"=",
"[",
"]",
"url",
"=",
"self",
".",
"_... | The Analyze call helps a client analyze a CSV file prior to
publishing or generating features using the Publish or Generate
operation, respectively.
Analyze returns information about the file including the fields
present as well as sample records. Analyze attempts to detect the
p... | [
"The",
"Analyze",
"call",
"helps",
"a",
"client",
"analyze",
"a",
"CSV",
"file",
"prior",
"to",
"publishing",
"or",
"generating",
"features",
"using",
"the",
"Publish",
"or",
"Generate",
"operation",
"respectively",
".",
"Analyze",
"returns",
"information",
"abo... | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageorg/_content.py#L2905-L2969 |
13,085 | Esri/ArcREST | src/arcrest/manageorg/_content.py | Group.__assembleURL | def __assembleURL(self, url, groupId):
"""private function that assembles the URL for the community.Group
class"""
from ..packages.six.moves.urllib_parse import urlparse
parsed = urlparse(url)
communityURL = "%s://%s%s/sharing/rest/community/groups/%s" % (parsed.scheme, parsed.ne... | python | def __assembleURL(self, url, groupId):
"""private function that assembles the URL for the community.Group
class"""
from ..packages.six.moves.urllib_parse import urlparse
parsed = urlparse(url)
communityURL = "%s://%s%s/sharing/rest/community/groups/%s" % (parsed.scheme, parsed.ne... | [
"def",
"__assembleURL",
"(",
"self",
",",
"url",
",",
"groupId",
")",
":",
"from",
".",
".",
"packages",
".",
"six",
".",
"moves",
".",
"urllib_parse",
"import",
"urlparse",
"parsed",
"=",
"urlparse",
"(",
"url",
")",
"communityURL",
"=",
"\"%s://%s%s/shar... | private function that assembles the URL for the community.Group
class | [
"private",
"function",
"that",
"assembles",
"the",
"URL",
"for",
"the",
"community",
".",
"Group",
"class"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageorg/_content.py#L3137-L3145 |
13,086 | Esri/ArcREST | src/arcrest/manageorg/_content.py | Group.group | def group(self):
"""returns the community.Group class for the current group"""
split_count = self._url.lower().find("/content/")
len_count = len('/content/')
gURL = self._url[:self._url.lower().find("/content/")] + \
"/community/" + self._url[split_count+ len_count:]#self.__a... | python | def group(self):
"""returns the community.Group class for the current group"""
split_count = self._url.lower().find("/content/")
len_count = len('/content/')
gURL = self._url[:self._url.lower().find("/content/")] + \
"/community/" + self._url[split_count+ len_count:]#self.__a... | [
"def",
"group",
"(",
"self",
")",
":",
"split_count",
"=",
"self",
".",
"_url",
".",
"lower",
"(",
")",
".",
"find",
"(",
"\"/content/\"",
")",
"len_count",
"=",
"len",
"(",
"'/content/'",
")",
"gURL",
"=",
"self",
".",
"_url",
"[",
":",
"self",
".... | returns the community.Group class for the current group | [
"returns",
"the",
"community",
".",
"Group",
"class",
"for",
"the",
"current",
"group"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageorg/_content.py#L3149-L3159 |
13,087 | Esri/ArcREST | src/arcrest/common/renderer.py | UniqueValueRenderer.addUniqueValue | def addUniqueValue(self, value, label, description, symbol):
"""
adds a unique value to the renderer
"""
if self._uniqueValueInfos is None:
self._uniqueValueInfos = []
self._uniqueValueInfos.append(
{
"value" : value,
"label... | python | def addUniqueValue(self, value, label, description, symbol):
"""
adds a unique value to the renderer
"""
if self._uniqueValueInfos is None:
self._uniqueValueInfos = []
self._uniqueValueInfos.append(
{
"value" : value,
"label... | [
"def",
"addUniqueValue",
"(",
"self",
",",
"value",
",",
"label",
",",
"description",
",",
"symbol",
")",
":",
"if",
"self",
".",
"_uniqueValueInfos",
"is",
"None",
":",
"self",
".",
"_uniqueValueInfos",
"=",
"[",
"]",
"self",
".",
"_uniqueValueInfos",
"."... | adds a unique value to the renderer | [
"adds",
"a",
"unique",
"value",
"to",
"the",
"renderer"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/common/renderer.py#L249-L262 |
13,088 | Esri/ArcREST | src/arcrest/common/renderer.py | UniqueValueRenderer.removeUniqueValue | def removeUniqueValue(self, value):
"""removes a unique value in unique Value Info"""
for v in self._uniqueValueInfos:
if v['value'] == value:
self._uniqueValueInfos.remove(v)
return True
del v
return False | python | def removeUniqueValue(self, value):
"""removes a unique value in unique Value Info"""
for v in self._uniqueValueInfos:
if v['value'] == value:
self._uniqueValueInfos.remove(v)
return True
del v
return False | [
"def",
"removeUniqueValue",
"(",
"self",
",",
"value",
")",
":",
"for",
"v",
"in",
"self",
".",
"_uniqueValueInfos",
":",
"if",
"v",
"[",
"'value'",
"]",
"==",
"value",
":",
"self",
".",
"_uniqueValueInfos",
".",
"remove",
"(",
"v",
")",
"return",
"Tru... | removes a unique value in unique Value Info | [
"removes",
"a",
"unique",
"value",
"in",
"unique",
"Value",
"Info"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/common/renderer.py#L264-L271 |
13,089 | Esri/ArcREST | src/arcrest/common/renderer.py | ClassBreakRenderer.addClassBreak | def addClassBreak(self, classMinValue, classMaxValue, label, description, symbol):
"""
adds a classification break value to the renderer
"""
if self._classBreakInfos is None:
self._classBreakInfos = []
self._classBreakInfos.append(
{
"class... | python | def addClassBreak(self, classMinValue, classMaxValue, label, description, symbol):
"""
adds a classification break value to the renderer
"""
if self._classBreakInfos is None:
self._classBreakInfos = []
self._classBreakInfos.append(
{
"class... | [
"def",
"addClassBreak",
"(",
"self",
",",
"classMinValue",
",",
"classMaxValue",
",",
"label",
",",
"description",
",",
"symbol",
")",
":",
"if",
"self",
".",
"_classBreakInfos",
"is",
"None",
":",
"self",
".",
"_classBreakInfos",
"=",
"[",
"]",
"self",
".... | adds a classification break value to the renderer | [
"adds",
"a",
"classification",
"break",
"value",
"to",
"the",
"renderer"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/common/renderer.py#L400-L414 |
13,090 | Esri/ArcREST | src/arcrest/common/renderer.py | ClassBreakRenderer.removeClassBreak | def removeClassBreak(self, label):
"""removes a classification break value to the renderer"""
for v in self._classBreakInfos:
if v['label'] == label:
self._classBreakInfos.remove(v)
return True
del v
return False | python | def removeClassBreak(self, label):
"""removes a classification break value to the renderer"""
for v in self._classBreakInfos:
if v['label'] == label:
self._classBreakInfos.remove(v)
return True
del v
return False | [
"def",
"removeClassBreak",
"(",
"self",
",",
"label",
")",
":",
"for",
"v",
"in",
"self",
".",
"_classBreakInfos",
":",
"if",
"v",
"[",
"'label'",
"]",
"==",
"label",
":",
"self",
".",
"_classBreakInfos",
".",
"remove",
"(",
"v",
")",
"return",
"True",... | removes a classification break value to the renderer | [
"removes",
"a",
"classification",
"break",
"value",
"to",
"the",
"renderer"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/common/renderer.py#L416-L423 |
13,091 | Esri/ArcREST | src/arcrest/ags/mapservice.py | MapService.downloadThumbnail | def downloadThumbnail(self, outPath):
"""downloads the items's thumbnail"""
url = self._url + "/info/thumbnail"
params = {
}
return self._get(url=url,
out_folder=outPath,
file_name=None,
param_di... | python | def downloadThumbnail(self, outPath):
"""downloads the items's thumbnail"""
url = self._url + "/info/thumbnail"
params = {
}
return self._get(url=url,
out_folder=outPath,
file_name=None,
param_di... | [
"def",
"downloadThumbnail",
"(",
"self",
",",
"outPath",
")",
":",
"url",
"=",
"self",
".",
"_url",
"+",
"\"/info/thumbnail\"",
"params",
"=",
"{",
"}",
"return",
"self",
".",
"_get",
"(",
"url",
"=",
"url",
",",
"out_folder",
"=",
"outPath",
",",
"fil... | downloads the items's thumbnail | [
"downloads",
"the",
"items",
"s",
"thumbnail"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/ags/mapservice.py#L92-L104 |
13,092 | Esri/ArcREST | src/arcrest/ags/mapservice.py | MapService.__init | def __init(self):
""" populates all the properties for the map service """
params = {"f": "json"}
json_dict = self._get(self._url, params,
securityHandler=self._securityHandler,
proxy_port=self._proxy_port,
... | python | def __init(self):
""" populates all the properties for the map service """
params = {"f": "json"}
json_dict = self._get(self._url, params,
securityHandler=self._securityHandler,
proxy_port=self._proxy_port,
... | [
"def",
"__init",
"(",
"self",
")",
":",
"params",
"=",
"{",
"\"f\"",
":",
"\"json\"",
"}",
"json_dict",
"=",
"self",
".",
"_get",
"(",
"self",
".",
"_url",
",",
"params",
",",
"securityHandler",
"=",
"self",
".",
"_securityHandler",
",",
"proxy_port",
... | populates all the properties for the map service | [
"populates",
"all",
"the",
"properties",
"for",
"the",
"map",
"service"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/ags/mapservice.py#L132-L195 |
13,093 | Esri/ArcREST | src/arcrest/ags/mapservice.py | MapService.getExtensions | def getExtensions(self):
"""returns objects for all map service extensions"""
extensions = []
if isinstance(self.supportedExtensions, list):
for ext in self.supportedExtensions:
extensionURL = self._url + "/exts/%s" % ext
if ext == "SchematicsServer":
... | python | def getExtensions(self):
"""returns objects for all map service extensions"""
extensions = []
if isinstance(self.supportedExtensions, list):
for ext in self.supportedExtensions:
extensionURL = self._url + "/exts/%s" % ext
if ext == "SchematicsServer":
... | [
"def",
"getExtensions",
"(",
"self",
")",
":",
"extensions",
"=",
"[",
"]",
"if",
"isinstance",
"(",
"self",
".",
"supportedExtensions",
",",
"list",
")",
":",
"for",
"ext",
"in",
"self",
".",
"supportedExtensions",
":",
"extensionURL",
"=",
"self",
".",
... | returns objects for all map service extensions | [
"returns",
"objects",
"for",
"all",
"map",
"service",
"extensions"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/ags/mapservice.py#L423-L442 |
13,094 | Esri/ArcREST | src/arcrest/ags/mapservice.py | MapService.allLayers | def allLayers(self):
""" returns all layers for the service """
url = self._url + "/layers"
params = {
"f" : "json"
}
res = self._get(url, param_dict=params,
securityHandler=self._securityHandler,
proxy_url=self._p... | python | def allLayers(self):
""" returns all layers for the service """
url = self._url + "/layers"
params = {
"f" : "json"
}
res = self._get(url, param_dict=params,
securityHandler=self._securityHandler,
proxy_url=self._p... | [
"def",
"allLayers",
"(",
"self",
")",
":",
"url",
"=",
"self",
".",
"_url",
"+",
"\"/layers\"",
"params",
"=",
"{",
"\"f\"",
":",
"\"json\"",
"}",
"res",
"=",
"self",
".",
"_get",
"(",
"url",
",",
"param_dict",
"=",
"params",
",",
"securityHandler",
... | returns all layers for the service | [
"returns",
"all",
"layers",
"for",
"the",
"service"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/ags/mapservice.py#L445-L477 |
13,095 | Esri/ArcREST | src/arcrest/ags/mapservice.py | MapService.find | def find(self, searchText, layers,
contains=True, searchFields="",
sr="", layerDefs="",
returnGeometry=True, maxAllowableOffset="",
geometryPrecision="", dynamicLayers="",
returnZ=False, returnM=False, gdbVersion=""):
""" performs the map service ... | python | def find(self, searchText, layers,
contains=True, searchFields="",
sr="", layerDefs="",
returnGeometry=True, maxAllowableOffset="",
geometryPrecision="", dynamicLayers="",
returnZ=False, returnM=False, gdbVersion=""):
""" performs the map service ... | [
"def",
"find",
"(",
"self",
",",
"searchText",
",",
"layers",
",",
"contains",
"=",
"True",
",",
"searchFields",
"=",
"\"\"",
",",
"sr",
"=",
"\"\"",
",",
"layerDefs",
"=",
"\"\"",
",",
"returnGeometry",
"=",
"True",
",",
"maxAllowableOffset",
"=",
"\"\"... | performs the map service find operation | [
"performs",
"the",
"map",
"service",
"find",
"operation"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/ags/mapservice.py#L479-L511 |
13,096 | Esri/ArcREST | src/arcrest/ags/mapservice.py | MapService.getFeatureDynamicLayer | def getFeatureDynamicLayer(self, oid, dynamicLayer,
returnZ=False, returnM=False):
""" The feature resource represents a single feature in a dynamic
layer in a map service
"""
url = self._url + "/dynamicLayer/%s" % oid
params = {
"f"... | python | def getFeatureDynamicLayer(self, oid, dynamicLayer,
returnZ=False, returnM=False):
""" The feature resource represents a single feature in a dynamic
layer in a map service
"""
url = self._url + "/dynamicLayer/%s" % oid
params = {
"f"... | [
"def",
"getFeatureDynamicLayer",
"(",
"self",
",",
"oid",
",",
"dynamicLayer",
",",
"returnZ",
"=",
"False",
",",
"returnM",
"=",
"False",
")",
":",
"url",
"=",
"self",
".",
"_url",
"+",
"\"/dynamicLayer/%s\"",
"%",
"oid",
"params",
"=",
"{",
"\"f\"",
":... | The feature resource represents a single feature in a dynamic
layer in a map service | [
"The",
"feature",
"resource",
"represents",
"a",
"single",
"feature",
"in",
"a",
"dynamic",
"layer",
"in",
"a",
"map",
"service"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/ags/mapservice.py#L524-L545 |
13,097 | Esri/ArcREST | src/arcrest/ags/mapservice.py | MapService.identify | def identify(self,
geometry,
mapExtent,
imageDisplay,
tolerance,
geometryType="esriGeometryPoint",
sr=None,
layerDefs=None,
time=None,
layerTimeOptions=None,
... | python | def identify(self,
geometry,
mapExtent,
imageDisplay,
tolerance,
geometryType="esriGeometryPoint",
sr=None,
layerDefs=None,
time=None,
layerTimeOptions=None,
... | [
"def",
"identify",
"(",
"self",
",",
"geometry",
",",
"mapExtent",
",",
"imageDisplay",
",",
"tolerance",
",",
"geometryType",
"=",
"\"esriGeometryPoint\"",
",",
"sr",
"=",
"None",
",",
"layerDefs",
"=",
"None",
",",
"time",
"=",
"None",
",",
"layerTimeOptio... | The identify operation is performed on a map service resource
to discover features at a geographic location. The result of this
operation is an identify results resource. Each identified result
includes its name, layer ID, layer name, geometry and geometry type,
and other... | [
"The",
"identify",
"operation",
"is",
"performed",
"on",
"a",
"map",
"service",
"resource",
"to",
"discover",
"features",
"at",
"a",
"geographic",
"location",
".",
"The",
"result",
"of",
"this",
"operation",
"is",
"an",
"identify",
"results",
"resource",
".",
... | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/ags/mapservice.py#L547-L708 |
13,098 | Esri/ArcREST | src/arcrest/manageags/parameters.py | Extension.fromJSON | def fromJSON(value):
"""returns the object from json string or dictionary"""
if isinstance(value, str):
value = json.loads(value)
elif isinstance(value, dict): pass
else:
raise AttributeError("Invalid input")
return Extension(typeName=value['typeName'],
... | python | def fromJSON(value):
"""returns the object from json string or dictionary"""
if isinstance(value, str):
value = json.loads(value)
elif isinstance(value, dict): pass
else:
raise AttributeError("Invalid input")
return Extension(typeName=value['typeName'],
... | [
"def",
"fromJSON",
"(",
"value",
")",
":",
"if",
"isinstance",
"(",
"value",
",",
"str",
")",
":",
"value",
"=",
"json",
".",
"loads",
"(",
"value",
")",
"elif",
"isinstance",
"(",
"value",
",",
"dict",
")",
":",
"pass",
"else",
":",
"raise",
"Attr... | returns the object from json string or dictionary | [
"returns",
"the",
"object",
"from",
"json",
"string",
"or",
"dictionary"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/manageags/parameters.py#L110-L122 |
13,099 | Esri/ArcREST | src/arcrest/webmap/symbols.py | Color.asList | def asList(self):
""" returns the value as the list object"""
return [self._red, self._green, self._blue, self._alpha] | python | def asList(self):
""" returns the value as the list object"""
return [self._red, self._green, self._blue, self._alpha] | [
"def",
"asList",
"(",
"self",
")",
":",
"return",
"[",
"self",
".",
"_red",
",",
"self",
".",
"_green",
",",
"self",
".",
"_blue",
",",
"self",
".",
"_alpha",
"]"
] | returns the value as the list object | [
"returns",
"the",
"value",
"as",
"the",
"list",
"object"
] | ab240fde2b0200f61d4a5f6df033516e53f2f416 | https://github.com/Esri/ArcREST/blob/ab240fde2b0200f61d4a5f6df033516e53f2f416/src/arcrest/webmap/symbols.py#L77-L79 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.