npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ags-walk

v2.2.0

Published

Walks an ArcGIS Server Rest API and returns all services

Downloads

28

Readme

ags-walk

Walk the folders of an ArcGIS Server Rest API and return all the services as an array

about

ArcGIS Server is GIS software used by many federal, state, and municipal governments and organizations to publish web-enabled GIS data. ArcGIS Server uses the GeoServices API. This module walks the services and folders of the root GeoServices API for a given URL and returns all services and service types in an array. This could be used to create a repository of dataset names from one or more ArcGIS Server REST URLs.

Links to each dataset URL can be made by concatenating the root GeoServices URL with the dataset item and dataset type. For example, if the root URL is http://sampleserver6.arcgisonline.com/arcgis/rest/services and one of the datasets in the array is { name: '911CallsHotspot', type: 'MapServer' } the full URL to the service is http://sampleserver6.arcgisonline.com/arcgis/rest/services/911CallsHotspot/MapServer.

command line

With Node v8.2.0+ it is not necessary to install ags-walk. You can run:

npx ags-walk <server-url> [options]

See example and available options by entering

npx ags-walk -h

install

To use as a dependency in a Node.js library you can install ags-walk by running:

npm i ags-walk

then include

var agsWalk = require('ags-walk')

in your script file.

For the browser include the tag: <script src="https://unpkg.com/ags-walk/ags-walk.min.js"></script> and agsWalk() is added as a global function.

api

agsWalk

Walk the folders of an ArcGIS Server Rest API and return all the services as an array

Parameters

  • url string the base url of an ArcGIS Server Rest API
  • opts Object? options for the module
    • opts.limit number the maximum number of folders to index at the same time (optional, default 5)
  • cb Function the callback function to run after results have been returned

Examples

// returns [{ name: 'Elevation/earthquakedemoelevation, type: 'MapServer'}...]
agsWalk('http://sampleserver6.arcgisonline.com/arcgis/rest/services', function(err, services) {
 if (err) throw err
 return services
}

Returns Array<Object>

license

Copyright 2017 Nick Peihl

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.