Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make esri url checks more general #40

Merged
merged 16 commits into from
May 11, 2022

Conversation

jacpete
Copy link
Collaborator

@jacpete jacpete commented Jan 10, 2022

Purpose: Adapt esriUrl_isValid to accept valid, but non-service/feature URL's like the root of a server or a folder page like https://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics or https://sampleserver1.arcgisonline.com/ArcGIS/rest/services

Deprecated/Renamed Exported Functions:

  • esriUrl_isValidID -> esriUrl_isValidFeature
  • esriUrl_ServerUrl -> esriUrl_serviceUrl

Added Functions:

  • esriUrl_isValidFolder
  • esriUrl_isValidRoot
  • esriUrl_isValidType (unexported but now does all the heavy lifting in the esriUrl_* functions)

Changed Functions:

  • Output of esriUrl_parseUrl() used to be a list with the names: ["url", "scheme", "host", "instance", "restIndicator", "folderName", "serviceName", "layerID"] and is now a list with the names: ["url", "scheme", "host", "instance", "restIndicator", "folderPath", "serviceName", "serviceType", "featureID"]
  • Added a token argument to most if not all public functions

@jacpete
Copy link
Collaborator Author

jacpete commented Jan 10, 2022

@elipousson Here is what I am pulling together to fix the esriUrl_isValid issues in #39 . I want to go a little deeper and make sure everything is still working correctly in some of the functions that don't have tests built for them yet. Main thing is a major update to generalize esriUrl_isValid, but I also made some slight changes in the output of esriUrl_parseUrl and changed a couple function names. The function names I changed I just did a simple wrapper around the original function with a deprecation warning. This will be what we use if we decide to change standardize function names in the package. Feel free to download the branch and play with it to see if it will work with your idea of the esriIndex function.

…a URL in esriUrlValidType if an 'Invalid URL' message is returned by the server.
jacpete added 2 commits May 10, 2022 16:15
added token param to esriLayers
included a private test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant