FamilySearch / familysearch-javascript-sdk

See the FamilySearch API Javascript SDK documentation at
http://familysearch.github.io/familysearch-javascript-sdk
MIT License
42 stars 25 forks source link

This project has been deprecated. Please see FS-JS-lite

GedcomX - JavaScript SDK

npm Build Status Coverage Status Dependency Status devDependency Status

This JavaScript SDK is a high-level JavaScript wrapper around the FamilySearch REST API.

See the wiki for the following:

Installation

Node.js

Node versions 0.10 and 0.12 are officially supported.

npm install familysearch-javascript-sdk

Browser via a CDN

Available via both jsDelivr and unpkg.

<script src="https://github.com/FamilySearch/familysearch-javascript-sdk/raw/master//cdn.jsdelivr.net/npm/familysearch-javascript-sdk@2.10.1/dist/familysearch-javascript-sdk.min.js"></script>
<script src="https://github.com/FamilySearch/familysearch-javascript-sdk/raw/master//unpkg.com/familysearch-javascript-sdk@2.8.2/dist/familysearch-javascript-sdk.min.js"></script>

Features

JavaScript functions wrap the underlying REST API calls. The objects returned by the functions include convenience functions for extracting information from the returned JSON. For example, the following logs the name of a person along with their spouses and chilren.

```javascript
client.getPerson('KW7S-VQJ', {persons:true}).then(function(response) {
  console.log(response.getPrimaryPerson().getDisplayName());
});
```

Contributing

Thank you for your interest in contributing! We love pull requests.

Follow these steps to properly setup your development environment:

This project uses .editorconfig to help configure your editor for consistent code indentation and styling. Please follow the existing style in your changes.

Grunt runs jshint on the files using a rather strict .jshintrc file, which finds a lot of potential problems almost immediately. Your changes should pass the jshint checks. If you have a good reason not to follow a particular check for a particular statement, you can disable the jshint test for that statement. Some editors (e.g., WebStorm) can be configured to read the .jshintrc file to notify you immediately when something doesn't pass.

Grunt runs unit tests using jasmine. Please create unit tests for your changes. See the existing unit test files for examples.

Grunt also generates documentation for the project. Nearly a third of the code consists of comments that is turned into online documentation. Please comment your changes.

When choosing what to work on, you may pick an existing issue to implement or create a new issue. We suggest that you describe what you plan to implement in order to get feedback prior to implementation and issuing a pull request, though you are also free to issue a pull request and ask for comments afterward.