Code
stringlengths
103
85.9k
Summary
listlengths
0
94
Please provide a description of the function:def dispose(self): self._username = None self._password = None self._org_url = None self._proxy_url = None self._proxy_port = None self._token_url = None self._securityHandler = None self._valid = None ...
[ "Disposes the :py:class:`securityhandlerhelper` object." ]
Please provide a description of the function:def contributionStatus(self): import time url = "%s/contributors/%s/activeContribution" % (self.root, quote(self.contributorUID)) params = { "agolUserToken" : self._agolSH.token, "f" : "json" } res = se...
[ "gets the contribution status of a user" ]
Please provide a description of the function:def user(self): if self._user is None: url = "%s/users/%s" % (self.root, self._username) self._user = CMPUser(url=url, securityHandler=self._securityHandler, proxy_port...
[ "gets the user properties" ]
Please provide a description of the function:def metadataURL(self, value): if value != self._metadataURL: self._metadataURL = value self._metaFS = None
[ "gets/sets the public metadata url" ]
Please provide a description of the function:def metadataContributer(self): if self._metaFL is None: fl = FeatureService(url=self._metadataURL, proxy_url=self._proxy_url, proxy_port=self._proxy_port) self._metaFS = fl ...
[ "gets the metadata featurelayer object" ]
Please provide a description of the function:def local_time_to_online(dt=None): if dt is None: dt = datetime.datetime.now() is_dst = time.daylight and time.localtime().tm_isdst > 0 utc_offset = (time.altzone if is_dst else time.timezone) return (time.mktime(dt.timetuple()) * 1000) + (ut...
[ "\n converts datetime object to a UTC timestamp for AGOL\n Inputs:\n dt - datetime object\n Output:\n Long value\n " ]
Please provide a description of the function:def online_time_to_string(value, timeFormat, utcOffset=0): try: return datetime.datetime.fromtimestamp(value/1000 + utcOffset*3600).strftime(timeFormat) except: return "" finally: pass
[ "Converts AGOL timestamp to formatted string.\n\n Args:\n value (float): A UTC timestamp as reported by AGOL (time in ms since Unix epoch * 1000)\n timeFormat (str): Date/Time format string as parsed by :py:func:`datetime.strftime`.\n utcOffset (int): Hours difference from UTC and desired ou...
Please provide a description of the function:def set_value(self, field_name, value): if field_name in self.fields: if not value is None: self._dict['attributes'][field_name] = _unicode_convert(value) else: pass elif field_name.upper() in [...
[ " sets an attribute value for a given field name " ]
Please provide a description of the function:def get_value(self, 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
[ " returns a value for a given field name " ]
Please provide a description of the function:def asDictionary(self): 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['...
[ "returns the feature as a dictionary" ]
Please provide a description of the function:def asRow(self): fields = self.fields row = [""] * len(fields) for k,v in self._attributes.items(): row[fields.index(k)] = v del v del k if self.geometry is not None: row.append(self.geo...
[ " converts a feature to a list for insertion into an insert cursor\n Output:\n [row items], [field names]\n returns a list of fields and the row object\n " ]
Please provide a description of the function:def geometry(self): 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:...
[ "returns the feature geometry" ]
Please provide a description of the function:def geometry(self, value): if isinstance(value, (Polygon, Point, Polyline, MultiPoint)): if value.type == self.geometryType: self._geom = value elif arcpyFound: if isinstance(value, arcpy.Geometry): ...
[ "gets/sets a feature's geometry" ]
Please provide a description of the function:def fields(self): if 'feature' in self._dict: self._attributes = self._dict['feature']['attributes'] else: self._attributes = self._dict['attributes'] return self._attributes.keys()
[ " returns a list of feature fields " ]
Please provide a description of the function:def geometryType(self): if self._geomType is None: if self.geometry is not None: self._geomType = self.geometry.type else: self._geomType = "Table" return self._geomType
[ " returns the feature's geometry type " ]
Please provide a description of the function:def fc_to_features(dataset): if arcpyFound: desc = arcpy.Describe(dataset) fields = [field.name for field in arcpy.ListFields(dataset) if field.type not in ['Geometry']] date_fields = [field.name for field in arcpy.ListFie...
[ "\n converts a dataset to a list of feature objects\n Input:\n dataset - path to table or feature class\n Output:\n list of feature objects\n " ]
Please provide a description of the function:def mosaicMethod(self, value): if value in self.__allowedMosaicMethods and \ self._mosaicMethod != value: self._mosaicMethod = value
[ "\n get/set the mosaic method\n " ]
Please provide a description of the function:def value(self): if self.mosaicMethod == "esriMosaicNone" or\ self.mosaicMethod == "esriMosaicCenter" or \ self.mosaicMethod == "esriMosaicNorthwest" or \ self.mosaicMethod == "esriMosaicNadir": return { ...
[ "\n gets the mosaic rule object as a dictionary\n " ]
Please provide a description of the function:def value(self): return { "objectIdFieldName" : self._objectIdFieldName, "displayFieldName" : self._displayFieldName, "globalIdFieldName" : self._globalIdFieldName, "geometryType" : self._geometryType, ...
[ "returns object as dictionary" ]
Please provide a description of the function:def fromJSON(jsonValue): jd = json.loads(jsonValue) features = [] if 'fields' in jd: fields = jd['fields'] else: fields = {'fields':[]} if 'features' in jd: for feat in jd['features']: ...
[ "returns a featureset from a JSON string" ]
Please provide a description of the function:def spatialReference(self, value): if isinstance(value, SpatialReference): self._spatialReference = value elif isinstance(value, int): self._spatialReference = SpatialReference(wkid=value) elif isinstance(value, str) a...
[ "sets the featureset's spatial reference" ]
Please provide a description of the function:def save(self, saveLocation, outName): filename, file_extension = os.path.splitext(outName) if (file_extension == ".csv"): res = os.path.join(saveLocation,outName) import sys if sys.version_info[0] == 2: ...
[ "\n Saves a featureset object to a feature class\n Input:\n saveLocation - output location of the data\n outName - name of the table the data will be saved to\n Types:\n *.csv - CSV file returned\n *.json - text file with json\n ...
Please provide a description of the function:def removeUserData(self, users=None): admin = None portal = None user = None adminusercontent = None userFolder = None userContent = None userItem = None folderContent = None try: a...
[ "Removes users' content and data.\n \n Args:\n users (str): A comma delimited list of user names.\n Defaults to ``None``.\n \n Warning:\n When ``users`` is not provided (``None``), all users\n in the organization will have their data delete...
Please provide a description of the function:def removeUserGroups(self, users=None): admin = None userCommunity = None portal = None groupAdmin = None user = None userCommData = None group = None try: admin = arcrest.manageorg.Admini...
[ "Removes users' groups.\n \n Args:\n users (str): A comma delimited list of user names.\n Defaults to ``None``.\n \n Warning:\n When ``users`` is not provided (``None``), all users\n in the organization will have their groups deleted!\n ...
Please provide a description of the function:def regions(self): url = "%s/regions" % self.root params = {"f": "json"} return self._get(url=url, param_dict=params, proxy_url=self._proxy_url, proxy_port=se...
[ "gets the regions value" ]
Please provide a description of the function:def portalSelf(self): url = "%s/self" % self.root return Portal(url=url, securityHandler=self._securityHandler, proxy_url=self._proxy_url, proxy_port=self._proxy_port, ...
[ "The portal to which the current user belongs. This is an\n organizational portal if the user belongs to an organization or the\n default portal if the user does not belong to one" ]
Please provide a description of the function:def portal(self, portalID=None): if portalID is None: portalID = self.portalSelf.id url = "%s/%s" % (self.root, portalID) return Portal(url=url, securityHandler=self._securityHandler, proxy_url=...
[ "returns a specific reference to a portal" ]
Please provide a description of the function:def _findPortalId(self): 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, ...
[ "gets the portal id for a site if not known." ]
Please provide a description of the function:def portalId(self): if self._portalId is None: self._portalId = self._findPortalId() return self._portalId
[ "gets the portal Id" ]
Please provide a description of the function:def featureServers(self): if self.urls == {}: return {} featuresUrls = self.urls['urls']['features'] if 'https' in featuresUrls: res = featuresUrls['https'] elif 'http' in featuresUrls: res = featu...
[ "gets the hosting feature AGS Server" ]
Please provide a description of the function:def exportCustomers(self, outPath): url = "%s/customers/export" % self.root params = {"f":"csv"} dirPath = None fileName = None if outPath is not None: dirPath = os.path.dirname(outPath) fileName = os.p...
[ "exports customer list to a csv file\n Input:\n outPath - save location of the customer list\n " ]
Please provide a description of the function:def isServiceNameAvailable(self, name, serviceType): _allowedTypes = ['Feature Service', "Map Service"] url = self._url + "/isServiceNameAvailable" params = { "f" : "js...
[ "\n Checks to see if a given service name and type are available for\n publishing a new service. true indicates that the name and type is\n not found in the organization's services and is available for\n publishing. false means the requested name and type are not available.\n\n In...
Please provide a description of the function:def servers(self): url = "%s/servers" % self.root return Servers(url=url, securityHandler=self._securityHandler, proxy_url=self._proxy_url, proxy_port=self._proxy_port)
[ "gets the federated or registered servers for Portal" ]
Please provide a description of the function:def assignUserCredits(self, usernames, credits): userAssignments = [] for name in usernames: userAssignments.append( { "username" : name, "credits" : credits } ...
[ "\n assigns credit to a user.\n Inputs:\n usernames - list of users\n credits - number of credits to assign to the users\n Ouput:\n dictionary\n " ]
Please provide a description of the function:def createRole(self, name, description): params = { "name" : name, "description" : description, "f" : "json" } url = self.root + "/createRole" return self._post(url=url, ...
[ "\n creates a role for a portal/agol site.\n Inputs:\n names - name of the role\n description - brief text string stating the nature of this\n role.\n Ouput:\n dictionary\n " ]
Please provide a description of the function:def roles(self): return Roles(url="%s/roles" % self.root, securityHandler=self._securityHandler, proxy_url=self._proxy_url, proxy_port=self._proxy_port)
[ "gets the roles class that allows admins to manage custom roles\n on portal" ]
Please provide a description of the function:def cost(self, tileStorage=0, fileStorage=0, featureStorage=0, generatedTileCount=0, loadedTileCount=0, enrichVariableCount=0, enrichReportCount=0, serviceAreaCount=0, ...
[ "\n returns the cost values for a given portal\n Inputs:\n tileStorage - int - numbe of tiles to store in MBs\n fileStorage - int - size of file to store in MBs\n featureStorage - int - size in MBs\n generateTileCount - int - number of tiles to genearte on site\n ...
Please provide a description of the function:def updateSecurityPolicy(self, minLength=8, minUpper=None, minLower=None, minLetter=None, minDigit=None, ...
[ "updates the Portals security policy" ]
Please provide a description of the function:def portalAdmin(self): from ..manageportal import PortalAdministration return PortalAdministration(admin_url="https://%s/portaladmin" % self.portalHostname, securityHandler=self._securityHandler, ...
[ "gets a reference to a portal administration class" ]
Please provide a description of the function:def addUser(self, invitationList, subject, html): url = self._url + "/invite" params = {"f" : "json"} if isinstance(invitationList, parameters.InvitationList): params['invitationList'] = invitationList.value() ...
[ "\n adds a user without sending an invitation email\n\n Inputs:\n invitationList - InvitationList class used to add users without\n sending an email\n subject - email subject\n html - email message sent to users in invitation list object\n " ]
Please provide a description of the function:def inviteByEmail(self, emails, subject, text, html, role="org_user", mustApprove=True, expiration=1440): url = self.root + "...
[ "Invites a user or users to a site.\n\n Inputs:\n emails - comma seperated list of emails\n subject - title of email\n text - email text\n html - email text in html\n role - site role (can't be administrator)\n mustApprove - verifies if user that is...
Please provide a description of the function: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): url = self.root ...
[ "\n returns the usage statistics value\n " ]
Please provide a description of the function:def servers(self): 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']) ...
[ "gets all the server resources" ]
Please provide a description of the function:def deleteRole(self, roleID): url = self._url + "/%s/delete" % roleID params = { "f" : "json" } return self._post(url=url, param_dict=params, proxy_url=self._proxy_...
[ "\n deletes a role by ID\n\n " ]
Please provide a description of the function:def updateRole(self, roleID, name, description): params = { "name" : name, "description" : description, "f" : "json" } url = self._url + "/%s/update" return self._post(url=url, ...
[ "allows for the role name or description to be modified" ]
Please provide a description of the function:def findRoleID(self, name): for r in self: if r['name'].lower() == name.lower(): return r['id'] del r return None
[ "searches the roles by name and returns the role's ID" ]
Please provide a description of the function:def get_config_value(config_file, section, variable): try: parser = ConfigParser.SafeConfigParser() parser.read(config_file) return parser.get(section, variable) except: return None
[ " extracts a config file value " ]
Please provide a description of the function:def main(*argv): try: adminUsername = str(argv[0]) adminPassword = str(argv[1]) baseURL = str(argv[2]) #"https://www.arcgis.com/sharing/rest"# inviteSubject = str(argv[3]) inviteEmail = str(argv[4]) newUserName = argv[...
[ " main driver of program " ]
Please provide a description of the function:def users(self): return Users(url="%s/users" % self.root, securityHandler=self._securityHandler, proxy_url=self._proxy_url, proxy_port=self._proxy_port)
[ "\n Provides access to all user resources\n " ]
Please provide a description of the function:def getItem(self, itemId): url = "%s/items/%s" % (self.root, itemId) return Item(url=url, securityHandler=self._securityHandler, proxy_url=self._proxy_url, proxy_port=self._proxy_port)
[ "gets the refernce to the Items class which manages content on a\n given AGOL or Portal site.\n " ]
Please provide a description of the function:def FeatureContent(self): return FeatureContent(url="%s/%s" % (self.root, "features"), securityHandler=self._securityHandler, proxy_url=self._proxy_url, proxy_port=self...
[ "Feature Content class id the parent resource for feature\n operations such as Analyze and Generate." ]
Please provide a description of the function:def group(self, groupId): url = self._url + "/groups/%s" % groupId return Group(groupId=groupId, contentURL=url, securityHandler=self._securityHandler, proxy_url=self._proxy_url, ...
[ "\n The group's content provides access to the items that are shared\n with the group.\n Group items are stored by reference and are not physically stored\n in a group. Rather, they are stored as links to the original item\n in the item resource (/content/items/<itemId>).\n ...
Please provide a description of the function:def user(self, username=None): if username is None: username = self.__getUsername() url = "%s/%s" % (self.root, username) return User(url=url, securityHandler=self._securityHandler, proxy_u...
[ "gets the user's content. If None is passed, the current user is\n used.\n\n Input:\n username - name of the login for a given user on a site.\n " ]
Please provide a description of the function:def saveThumbnail(self,fileName,filePath): if self._thumbnail is None: self.__init() param_dict = {} if self._thumbnail is not None: imgUrl = self.root + "/info/" + self._thumbnail onlineFileName, file_ext...
[ " URL to the thumbnail used for the item " ]
Please provide a description of the function:def userItem(self): 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], ...
[ "returns a reference to the UserItem class" ]
Please provide a description of the function:def itemData(self, f=None, savePath=None): params = { } if f is not None and \ f.lower() in ['zip', 'json']: params['f'] = f url = "%s/data" % self.root if self.type in ["Shapefile", "CityEngine Web Sce...
[ " returns data for an item on agol/portal\n\n Inputs:\n f - output format either zip of json\n savePath - location to save the file\n Output:\n either JSON/text or filepath\n " ]
Please provide a description of the function: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 = { "f": "json", "rating" : "%s" % rating }...
[ "Adds a rating to an item between 1.0 and 5.0" ]
Please provide a description of the function:def deleteRating(self): url = "%s/deleteRating" % self.root params = { "f": "json", } return self._post(url, params, securityHandler=self._securityHandler, ...
[ "Removes the rating the calling user added for the specified item\n (POST only)." ]
Please provide a description of the function:def addComment(self, comment): url = "%s/addComment" % self.root params = { "f" : "json", "comment" : comment } return self._post(url, params, proxy_port=self._proxy_port, securityH...
[ " adds a comment to a given item. Must be authenticated " ]
Please provide a description of the function:def itemComment(self, commentId): url = "%s/comments/%s" % (self.root, commentId) params = { "f": "json" } return self._get(url, params, securityHandler=self._securit...
[ " returns details of a single comment " ]
Please provide a description of the function:def itemComments(self): url = "%s/comments/" % self.root params = { "f": "json" } return self._get(url, params, securityHandler=self._securityHandler, ...
[ " returns all comments for a given item " ]
Please provide a description of the function:def deleteComment(self, commentId): url = "%s/comments/%s/delete" % (self.root, commentId) params = { "f": "json", } return self._post(url, params, securityHandler=...
[ " removes a comment from an Item\n\n Inputs:\n commentId - unique id of comment to remove\n " ]
Please provide a description of the function:def packageInfo(self): url = "%s/item.pkinfo" % self.root params = {'f' : 'json'} result = self._get(url=url, param_dict=params, securityHandler=self._securityHandler, ...
[ "gets the item's package information file" ]
Please provide a description of the function:def metadata(self, exportFormat="default", output=None, saveFolder=None, fileName=None): url = "%s/info/metadata/metadata.xml" % self.root allowedFormats = ["fgdc", "inspire", "iso19...
[ "\n exports metadata to the various supported formats\n Inputs:\n exportFormats - export metadata to the following formats: fgdc,\n inspire, iso19139, iso19139-3.2, iso19115, arcgis, and default.\n default means the value will be ISO 19139 Metadata\n Implementati...
Please provide a description of the function:def updateMetadata(self, metadataFile): ip = ItemParameter() ip.metadata = metadataFile res = self.userItem.updateItem(itemParameters=ip, metadata=metadataFile) del ip return res
[ "\n updates or adds the current item's metadata\n metadataFile is the path to the XML file to upload.\n Output:\n dictionary\n " ]
Please provide a description of the function:def item(self): url = self._contentURL return Item(url=self._contentURL, securityHandler=self._securityHandler, proxy_url=self._proxy_url, proxy_port=self._proxy_port, in...
[ "returns the Item class of an Item" ]
Please provide a description of the function:def reassignItem(self, targetUsername, targetFoldername): params = { "f" : "json", "targetUsername" : targetUsername, "targetFoldername" : targetFoldername } url = ...
[ "\n The Reassign Item operation allows the administrator of an\n organization to reassign a member's item to another member of the\n organization.\n\n Inputs:\n targetUsername - The target username of the new owner of the\n item\n targetFold...
Please provide a description of the function:def updateItem(self, itemParameters, clearEmptyFields=False, data=None, metadata=None, text=None, serviceUrl=None, multipart=False): ...
[ "\n updates an item's properties using the ItemParameter class.\n\n Inputs:\n itemParameters - property class to update\n clearEmptyFields - boolean, cleans up empty values\n data - updates the file property of the service like a .sd file\n metadata - this is an...
Please provide a description of the function:def status(self, jobId=None, jobType=None): params = { "f" : "json" } if jobType is not None: params['jobType'] = jobType if jobId is not None: params["jobId"] = jobId url = "%s/status" % se...
[ "\n Inquire about status when publishing an item, adding an item in\n async mode, or adding with a multipart upload. \"Partial\" is\n available for Add Item Multipart, when only a part is uploaded\n and the item is not committed.\n\n Input:\n jobType Th...
Please provide a description of the function:def commit(self, wait=False, additionalParams={}): url = "%s/commit" % self.root params = { "f" : "json", } for key, value in additionalParams.items(): params[key] = value if wait == True: ...
[ "\n Commit is called once all parts are uploaded during a multipart Add\n Item or Update Item operation. The parts are combined into a file,\n and the original file is overwritten during an Update Item\n operation. This is an asynchronous call and returns immediately.\n Status can...
Please provide a description of the function:def addByPart(self, filePath): def read_in_chunks(file_object, chunk_size=10000000): while True: data = file_object.read(chunk_size) if not data: break yield data ...
[ "\n Allows for large file uploads to be split into 50 MB chunks and\n to be sent to AGOL/Portal. This resolves an issue in Python,\n where the multi-part POST runs out of memory.\n To use this function, an addItem() must be run first and that\n item id must be pass...
Please provide a description of the function:def __init(self, folder='/'): params = { "f" : "json" } if folder is None or folder == "/": folder = 'root' result_template = { "username": "", "total": 0, "start": 1, ...
[ "loads the property data into the class" ]
Please provide a description of the function:def search(self, start=1, num=10): url = self.location params = { "f" : "json", "num" : num, "start" : start } return self._get(url=url, pa...
[ "\n Returns the items for the current location of the user's content\n Inputs:\n start - The number of the first entry in the result set\n response. The index number is 1-based.\n The default value of start is 1 (that is, the first\n ...
Please provide a description of the function: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._loadFolde...
[]
Please provide a description of the function:def currentFolder(self, value): if value is not None and value.lower() == self._currentFolder['title']: return if value is None: self._location = self.root self._currentFolder = { 'title': 'root...
[ "gets/sets the current folder (folder id)" ]
Please provide a description of the function: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']), securityHan...
[]
Please provide a description of the function:def addRelationship(self, originItemId, destinationItemId, relationshipType): url = "%s/addRelationship" % self.root params = { "originItemId" : originItemId, ...
[ "\n Adds a relationship of a certain type between two items.\n\n Inputs:\n originItemId - The item ID of the origin item of the\n relationship\n destinationItemId - The item ID of the destination item of the\n relationship.\n ...
Please provide a description of the function:def publishItem(self, fileType, publishParameters=None, itemId=None, filePath=None, text=None, outputType=None, buildIntialCache=False,...
[ "\n Publishes a hosted service based on an existing source item.\n Publishers can create feature services as well as tiled map\n services.\n Feature services can be created using input files of type csv,\n shapefile, serviceDefinition, featureCollection, and\n fileGeodataba...
Please provide a description of the function:def exportItem(self, title, itemId, exportFormat, tags="export", snippet=None, exportParameters=None, wait=True): url = "%s/e...
[ "\n Exports a service item (POST only) to the specified output format.\n Available only to users with an organizational subscription.\n Invokable only by the service item owner or an administrator.\n\n Inputs:\n title - name of export item\n itemId - id of the item to...
Please provide a description of the function:def shareItems(self, items, groups="", everyone=False, org=False): url = "%s/shareItems" % self.root params = { "f" : "json", "items" : items, "everyone" : everyone, "org" : org, ...
[ "\n Shares a batch of items with the specified list of groups. Users\n can only share items with groups to which they belong. This\n operation also allows a user to share items with everyone, in which\n case the items are publicly accessible, or with everyone in their\n organizati...
Please provide a description of the function:def createFolder(self, name): url = "%s/createFolder" % self.root params = { "f" : "json", "title" : name } self._folders = None return self._post(url=url, param_dict=params...
[ "\n Creates a folder in which items can be placed. Folders are only\n visible to a user and solely used for organizing content within\n that user's content space.\n " ]
Please provide a description of the function:def _addItemMultiPart(self, itemParameters, filePath): url = self._location + "/addItem" params = { "f": "json", 'multipart' : 'true', "filename" : os.path.basena...
[ "\n The secret sauce behind the addByPart workflow\n Inputs:\n itemParatmers - ItemParamter class\n filePath - full disk path location.\n Output:\n UserItem class\n " ]
Please provide a description of the function:def addItem(self, itemParameters, filePath=None, overwrite=False, folder=None, dataURL=None, url=None, text=None, relationshipType=None, ...
[ "\n Adds an item to ArcGIS Online or Portal.\n Te Add Item operation (POST only) is used to upload an item file,\n submit text content, or submit the item URL to the specified user\n folder depending on documented items and item types. This operation\n is available only to the spe...
Please provide a description of the function:def analyze(self, itemId=None, filePath=None, text=None, fileType="csv", analyzeParameters=None): files = [] url = self._url + "/analyze" params = { "...
[ "\n The Analyze call helps a client analyze a CSV file prior to\n publishing or generating features using the Publish or Generate\n operation, respectively.\n Analyze returns information about the file including the fields\n present as well as sample records. Analyze attempts to d...
Please provide a description of the function:def generate(self, publishParameters, itemId=None, filePath=None, fileType=None, option='on' ): allowedFileTypes = ['shapefile', 'csv'] files = {} ...
[ "\n The Generate call helps a client generate features from a CSV file\n or a shapefile.\n CSV files that contain location fields (either address fields or X,\n Y fields) are spatially enabled by the Generate operation.\n The result of Generate is a JSON feature collection.\n ...
Please provide a description of the function:def __assembleURL(self, url, groupId): from ..packages.six.moves.urllib_parse import urlparse parsed = urlparse(url) communityURL = "%s://%s%s/sharing/rest/community/groups/%s" % (parsed.scheme, parsed.netloc, ...
[ "private function that assembles the URL for the community.Group\n class" ]
Please provide a description of the function:def group(self): 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.__assembleURL(self....
[ "returns the community.Group class for the current group" ]
Please provide a description of the function:def rotationType(self, value): if self._rotationType.lower() in self._rotationTypes and \ self._rotationType != value: self._rotationType = value
[ "gets/sets the rotationType" ]
Please provide a description of the function:def value(self): return { "type" : "simple", "symbol" : self.symbol.value, "label" : self.label, "description" : self.description, "rotationType": self.rotationType, "rotation...
[ "returns object as dictionary" ]
Please provide a description of the function:def addUniqueValue(self, value, label, description, symbol): if self._uniqueValueInfos is None: self._uniqueValueInfos = [] self._uniqueValueInfos.append( { "value" : value, "label" : label, ...
[ "\n adds a unique value to the renderer\n " ]
Please provide a description of the function:def removeUniqueValue(self, value): for v in self._uniqueValueInfos: if v['value'] == value: self._uniqueValueInfos.remove(v) return True del v return False
[ "removes a unique value in unique Value Info" ]
Please provide a description of the function:def value(self): return { "type" : "uniqueValue", "field1" : self._field1, "field2" : self._field2, "field3" : self._field3, "fieldDelimiter" : self._fieldDelimiter, "defaultSymbol" : s...
[ "returns object as dictionary" ]
Please provide a description of the function:def addClassBreak(self, classMinValue, classMaxValue, label, description, symbol): if self._classBreakInfos is None: self._classBreakInfos = [] self._classBreakInfos.append( { "classMinValue" : classMinValue, ...
[ "\n adds a classification break value to the renderer\n " ]
Please provide a description of the function:def removeClassBreak(self, label): for v in self._classBreakInfos: if v['label'] == label: self._classBreakInfos.remove(v) return True del v return False
[ "removes a classification break value to the renderer" ]
Please provide a description of the function:def value(self): return { "type" : "classBreaks", "field" : self._field, "classificationMethod" : "<classification method>", "normalizationType" : self._normalizationType, "normalizationField" : sel...
[ "returns object as dictionary" ]
Please provide a description of the function:def downloadThumbnail(self, outPath): url = self._url + "/info/thumbnail" params = { } return self._get(url=url, out_folder=outPath, file_name=None, ...
[ "downloads the items's thumbnail" ]
Please provide a description of the function:def __init(self): params = {"f": "json"} json_dict = self._get(self._url, params, securityHandler=self._securityHandler, proxy_port=self._proxy_port, ...
[ " populates all the properties for the map service " ]
Please provide a description of the function:def securityHandler(self, value): if isinstance(value, BaseSecurityHandler): if isinstance(value, security.AGSTokenSecurityHandler): self._securityHandler = value else: pass elif value is None: ...
[ " sets the security handler " ]
Please provide a description of the function:def getExtensions(self): extensions = [] if isinstance(self.supportedExtensions, list): for ext in self.supportedExtensions: extensionURL = self._url + "/exts/%s" % ext if ext == "SchematicsServer": ...
[ "returns objects for all map service extensions" ]
Please provide a description of the function:def allLayers(self): url = self._url + "/layers" params = { "f" : "json" } res = self._get(url, param_dict=params, securityHandler=self._securityHandler, proxy_url=self...
[ " returns all layers for the service " ]