1.1.20 • Published 6 years ago

geogig v1.1.20

Weekly downloads
1
License
Eclipse Distribut...
Repository
-
Last release
6 years ago

geogig

Geogig - JavaScript client for geogig GeoGig Web API. You can find out more about GeoGig at http://geogig.org This SDK is automatically generated by the Swagger Codegen project:

  • API version: 0.1.0
  • Package version: 0.1-SNAPSHOT
  • Build date: 2018-03-08T17:05:29.376-08:00
  • Build package: io.swagger.codegen.languages.JavascriptClientCodegen

Installation

For Node.js

npm

To publish the library as a npm, please follow the procedure in "Publishing npm packages".

Then install it via:

npm install geogig --save
Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json (and this README). Let's call this JAVASCRIPT_CLIENT_DIR. Then run:

npm install

Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR:

npm link

Finally, switch to the directory you want to use your geogig from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

You should now be able to require('geogig') in javascript files from the directory you ran the last command above from.

git

If the library is hosted at a git repository, e.g. https://github.com/GIT_USER_ID/GIT_REPO_ID then install it via:

    npm install GIT_USER_ID/GIT_REPO_ID --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file, that's to say your javascript file where you actually use this library):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

Please follow the installation instruction and execute the following JS code:

var Geogig = require('geogig');

var defaultClient = Geogig.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['X-GeoGig-API-Key'] = "Token"

// Configure HTTP basic authorization: BasicAuth
var BasicAuth = defaultClient.authentications['BasicAuth'];
BasicAuth.username = 'YOUR USERNAME'
BasicAuth.password = 'YOUR PASSWORD'

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN"

var api = new Geogig.AsyncApi()

var taskId = "taskId_example"; // {String} Async task identifier

api.abortTask(taskId).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Documentation for API Endpoints

All URIs are relative to http://virtserver.swaggerhub.com/groldan/geogig-web/1.0.0

ClassMethodHTTP requestDescription
Geogig.AsyncApiabortTaskPOST /tasks/{taskId}/abortAbort a running or scheduled task
Geogig.AsyncApicommitTransactionPOST /transactions/{user}/{repo}/{transactionId}/commitCommit transaction. Async operation.
Geogig.AsyncApiforkRepositoryPOST /repos/{user}/{repo}/forksFork this repository. Async operation.
Geogig.AsyncApigetTaskInfoGET /tasks/{taskId}Access status info for a given task
Geogig.AsyncApigetTaskProgressGET /tasks/{taskId}/progressGet task progress info
Geogig.AsyncApilistTasksGET /tasksList summary information for current asynchronous tasks
Geogig.AsyncApipruneTaskDELETE /tasks/{taskId}Prune a task if finished
Geogig.CollaborationApicheckoutPOST /repos/{user}/{repo}/branches/{branch}/checkoutCheckout this branch
Geogig.CollaborationApicreateBranchPOST /repos/{user}/{repo}/branches/{branch}Create a new branch by name
Geogig.CollaborationApicreatePullRequestPOST /repos/{user}/{repo}/pullsCreate a pull request
Geogig.CollaborationApideleteBranchDELETE /repos/{user}/{repo}/branches/{branch}Delete a branch by name
Geogig.CollaborationApigetBranchGET /repos/{user}/{repo}/branches/{branch}Get a branch by name
Geogig.CollaborationApigetCurrentBranchGET /repos/{user}/{repo}/branchGet the currently checked out branch, optionally indicating a transaction
Geogig.CollaborationApigetPullRequestGET /repos/{user}/{repo}/pulls/{pr}Get a specific pull request of this repo by id
Geogig.CollaborationApilistBranchesGET /repos/{user}/{repo}/branchesList all branches in the current repository
Geogig.CollaborationApilistPullRequestsGET /repos/{user}/{repo}/pullsList pull requests issued to this repo
Geogig.FeatureServiceApiaddFeaturesPOST /layers/{user}/{repo}/{layer}/featuresIserts features to this collection in the WORK_HEAD. Parameter features can be either a Feature or a FeatureCollection.
Geogig.FeatureServiceApicreateLayerPOST /layers/{user}/{repo}Create a new layer
Geogig.FeatureServiceApideleteFeatureDELETE /layers/{user}/{repo}/{layer}/features/{featureId}Delete a single feature at the current transaction's branch
Geogig.FeatureServiceApideleteFeaturesPOST /layers/{user}/{repo}/{layer}/rpc/deleteDelete features matching the given query
Geogig.FeatureServiceApideleteLayerDELETE /layers/{user}/{repo}/{layer}Delete a Layer from a repository at the current transaction's branch
Geogig.FeatureServiceApigetBoundsGET /layers/{user}/{repo}/{layer}/boundsGet layer bounds at the specified transaction/head. If no head is specified, defaults to WORK_HEAD
Geogig.FeatureServiceApigetFeatureGET /layers/{user}/{repo}/{layer}/features/{featureId}Get a single feature from a layer given its feature id, at the specified transaction/head
Geogig.FeatureServiceApigetFeaturesGET /layers/{user}/{repo}/{layer}/featuresGet Features from a geogig Layer
Geogig.FeatureServiceApigetLayerHashHEAD /layers/{user}/{repo}/{layer}Get a unique identifier for the current state of the layer.
Geogig.FeatureServiceApigetLayerInfoGET /layers/{user}/{repo}/{layer}Get layer metadata at the specified transaction/head
Geogig.FeatureServiceApigetLayersSummariesGET /layersreturn a summary of layers per user
Geogig.FeatureServiceApigetSchemaGET /layers/{user}/{repo}/{layer}/schemaGet Layer schema
Geogig.FeatureServiceApigetSizeGET /layers/{user}/{repo}/{layer}/sizeGet layer's number of features at the specified transaction/head. If no head is specified, defaults to WORK_HEAD
Geogig.FeatureServiceApigetUserLayersSummariesGET /layers/{user}return a summary of this user's layers
Geogig.FeatureServiceApilistLayersGET /layers/{user}/{repo}List layers in a repo
Geogig.FeatureServiceApimodifyFeaturePUT /layers/{user}/{repo}/{layer}/features/{featureId}Replace a single feature at the current transaction's branch
Geogig.FeatureServiceApimodifyFeaturesPOST /layers/{user}/{repo}/{layer}/rpc/updateModifies features matching the given query with the given values, in the WORK_HEAD of the currently checked out branch for the indicated transaction
Geogig.FeatureServiceApiqueryFeaturesPOST /layers/{user}/{repo}/{layer}/rpc/queryQuery and return features of this layer tha match the specified FeatureQuery
Geogig.FeatureServiceApitruncateDELETE /layers/{user}/{repo}/{layer}/featuresDeletes all features in the layer
Geogig.FeatureServiceApiupdateSchemaPUT /layers/{user}/{repo}/{layer}/schemaChange Layer schema. Must be called inside a transaction.
Geogig.RawRepositoryAccessApicountConflictsGET /repos/{user}/{repo}/geogig/conflicts/countGet number of conflicts in the repository
Geogig.RawRepositoryAccessApigetAllConfigGET /repos/{user}/{repo}/geogig/configList all config settings in the current repository
Geogig.RawRepositoryAccessApigetCommitGraphGET /repos/{user}/{repo}/geogig/graph
Geogig.RawRepositoryAccessApigetConflictsGET /repos/{user}/{repo}/geogig/conflictsList merge conflicts
Geogig.RawRepositoryAccessApigetObjectGET /repos/{user}/{repo}/geogig/objects/{objectId}Download a single revision object from a repository
Geogig.RawRepositoryAccessApilistIndexesGET /repos/{user}/{repo}/geogig/index
Geogig.RawRepositoryAccessApilistRefsGET /repos/{user}/{repo}/geogig/refsList all refs in the current repository
Geogig.RepositoryManagementApicountWatchersGET /repos/{user}/{repo}/watchers/countNumber of users watching this repository
Geogig.RepositoryManagementApicreateRepositoryPOST /repos/{user}/{repo}Create a new repository
Geogig.RepositoryManagementApideleteRepositoryDELETE /repos/{user}/{repo}Delete repository
Geogig.RepositoryManagementApiforkRepositoryPOST /repos/{user}/{repo}/forksFork this repository. Async operation.
Geogig.RepositoryManagementApigetRepositoryGET /repos/{user}/{repo}Get full repository information
Geogig.RepositoryManagementApilistForksGET /repos/{user}/{repo}/forksList repositories that are forks of this one
Geogig.RepositoryManagementApilistRepositoriesGET /reposList repositories summary information
Geogig.RepositoryManagementApilistUserRepositoriesGET /repos/{user}List of available repositories summary information
Geogig.RepositoryManagementApilistWatchersGET /repos/{user}/{repo}/watchersList users watching this repository
Geogig.RepositoryManagementApimodifyRepositoryPUT /repos/{user}/{repo}Modify repository
Geogig.RepositoryManagementApiunwatchRepositoryDELETE /repos/{user}/{repo}/watchersStop watching this repo.
Geogig.RepositoryManagementApiwatchRepositoryPOST /repos/{user}/{repo}/watchersStart watching this repo.
Geogig.RepositoryStoresApicountStoreReposGET /stores/{store}/repos/countReturn the number of repositories held on this store
Geogig.RepositoryStoresApicreateStorePOST /storesCreates a new repository store
Geogig.RepositoryStoresApigetStoreGET /stores/{store}Get repository store info by name
Geogig.RepositoryStoresApigetStoresGET /storesList summary information for available collections of repositories. Only stores visible to the current user are listed.
Geogig.RepositoryStoresApilistStoreReposGET /stores/{store}/reposList summary information for all repositories on this repository store
Geogig.RepositoryStoresApimodifyStorePUT /storesUpdate repository info
Geogig.RepositoryStoresApiremoveStoreDELETE /stores/{store}Remove the repository store configuration (disables all repositories on it)
Geogig.ServiceInfoApigetVersionGET /info/versionObtain service version information
Geogig.TransactionManagementApiabortTransactionPOST /transactions/{user}/{repo}/{transactionId}/abortAbort transaction. Returns immediately.
Geogig.TransactionManagementApicommitTransactionPOST /transactions/{user}/{repo}/{transactionId}/commitCommit transaction. Async operation.
Geogig.TransactionManagementApideleteTransactionInfoDELETE /transactions/{user}/{repo}/{transactionId}Delete a transaction information that's finished but not yet expired.
Geogig.TransactionManagementApigetTransactionInfoGET /transactions/{user}/{repo}/{transactionId}Obtain the current status of the given transaction
Geogig.TransactionManagementApilistAllTransactionsGET /transactionsList all non expired transactions open an all the repositories visible to the authenticated user
Geogig.TransactionManagementApilistRepositoryTransactionsGET /transactions/{user}/{repo}List all non expired transactions on the given repository
Geogig.TransactionManagementApilistUserTransactionsGET /transactions/{user}List all non expired transactions on all the repositories visible to the given user
Geogig.TransactionManagementApistartTransactionPOST /transactions/{user}/{repo}Start a new transaction on the given repository
Geogig.UsersApicreateUserPOST /usersCreates a new user
Geogig.UsersApideleteUserDELETE /users/{user}Delete user
Geogig.UsersApifollowPUT /users/{user}/following/{followee}Follow a user
Geogig.UsersApifollowsGET /users/{user}/following/{followee}Test whether :user is a follower of :followee
Geogig.UsersApigetSelfGET /userGet the request's authenticated user info
Geogig.UsersApigetUserGET /users/{user}Obtain either public or public + private user information depending on auth credentials
Geogig.UsersApigetUserRepositoriesGET /users/{user}/reposList the repositories owned by the given user
Geogig.UsersApigetUsersGET /usersList summary information for available collections of repositories. Only stores visible to the current user are listed.
Geogig.UsersApilistFollowersGET /users/{user}/followersList users following the given user
Geogig.UsersApilistFollowingGET /users/{user}/followingList of users the given user follows
Geogig.UsersApimodifyUserPUT /usersUpdates a user info
Geogig.UsersApiresetPasswordPUT /users/{user}/passwordResets the HTTP Basic password for the user. The request issuer must be either a site admin or the user itself. Note this is a temporary meassure until more advanced auth services are used
Geogig.UsersApiunfollowDELETE /users/{user}/following/{followee}Unfollow a user

Documentation for Models

Documentation for Authorization

ApiKeyAuth

  • Type: API key
  • API key parameter name: X-GeoGig-API-Key
  • Location: HTTP header

BasicAuth

  • Type: HTTP basic authentication

OAuth2

  • Type: OAuth
  • Flow: accessCode
  • Authorization URL: https://example.com/oauth/authorize
  • Scopes:
    • read: Grants read access
    • write: Grants write access
    • admin: Grants read and write access to administrative information
1.1.20

6 years ago

1.1.16

6 years ago

1.1.14

6 years ago

1.1.13

6 years ago

1.1.12

6 years ago

1.1.11

6 years ago

1.1.10

6 years ago

0.1.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago