├── .editorconfig ├── .gitignore ├── .travis.yml ├── 404.html.md ├── CHANGELOG.md ├── CONTRIBUTING.md ├── Gemfile ├── Gemfile.lock ├── LICENSE ├── Makefile ├── README.md ├── Vagrantfile ├── code_of_conduct.md ├── config.rb ├── deploy.sh ├── font-selection.json ├── lib ├── multilang.rb ├── toc_data.rb └── unique_head.rb ├── package-lock.json └── source ├── 404.html ├── CNAME ├── dav-cli └── user-guide │ └── index.html.md ├── fonts ├── slate.eot ├── slate.svg ├── slate.ttf ├── slate.woff └── slate.woff2 ├── images ├── car_parking │ └── header.png ├── cargo_insurance │ └── header.png ├── dav-portal.png ├── dav_cli │ └── header.png ├── drone_charging │ └── header.png ├── drone_delivery │ └── header.png ├── ev_charging │ └── header.png ├── favicon.png ├── header.png ├── logo.png ├── navbar.png ├── photo_shooting │ └── header.png ├── ride_hailing │ └── header.png ├── route_planning │ └── header.png ├── thumbnails │ ├── car_parking_thumbnail.png │ ├── cargo_insurance_thumbnail.png │ ├── cli_user_guide_tumbnail.png │ ├── drone_charging_thumbnail.png │ ├── drone_delivery_thumbnail.png │ ├── ev_charging_thumbnail.png │ ├── photo_shooting_thumbnail.png │ ├── ride_hailing_thumbnail.png │ ├── route_planning_thumbnail.png │ ├── vehicle_locating_thumbnail.png │ └── vessel_charging_thumbnail.png ├── vehicle_locating │ └── header.png └── vessel_charging │ └── header.png ├── index.html.md ├── javascripts ├── all.js ├── all_nosearch.js ├── app │ ├── _lang.js │ ├── _search.js │ └── _toc.js └── lib │ ├── _energize.js │ ├── _imagesloaded.min.js │ ├── _jquery.highlight.js │ ├── _jquery.js │ └── _lunr.js ├── layouts └── layout.erb ├── protocols ├── car-parking │ └── index.html.md ├── cargo-insurance │ └── index.html.md ├── drone-charging │ └── index.html.md ├── drone-delivery │ └── index.html.md ├── ev-charging │ └── index.html.md ├── photo-shooting │ └── index.html.md ├── ride-hailing │ └── index.html.md ├── route-planning │ └── index.html.md ├── vehicle-locating │ └── index.html.md └── vessel-charging │ └── index.html.md └── stylesheets ├── _icon-font.scss ├── _normalize.scss ├── _rtl.scss ├── _variables.scss ├── print.css.scss └── screen.css.scss /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # http://editorconfig.org 4 | 5 | root = true 6 | 7 | [*] 8 | indent_style = space 9 | indent_size = 2 10 | end_of_line = lf 11 | charset = utf-8 12 | trim_trailing_whitespace = true 13 | insert_final_newline = true 14 | [Makefile] 15 | indent_style = tab 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.gem 2 | *.rbc 3 | .bundle 4 | .config 5 | coverage 6 | InstalledFiles 7 | lib/bundler/man 8 | pkg 9 | rdoc 10 | spec/reports 11 | test/tmp 12 | test/version_tmp 13 | tmp 14 | *.DS_STORE 15 | build/ 16 | .cache 17 | .vagrant 18 | .sass-cache 19 | 20 | # YARD artifacts 21 | .yardoc 22 | _yardoc 23 | doc/ 24 | .idea/ 25 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | 3 | language: ruby 4 | 5 | rvm: 6 | - 2.3.3 7 | - 2.4.0 8 | 9 | cache: bundler 10 | script: bundle exec middleman build 11 | -------------------------------------------------------------------------------- /404.html.md: -------------------------------------------------------------------------------- 1 | index.html.md -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## Version 2.1.0 4 | 5 | *October 30, 2017* 6 | 7 | - Right-to-left text stylesheet option, thanks to [Mohammad Hossein Rabiee](https://github.com/mhrabiee) 8 | - Fix for HTML5 history state bug, thanks to [Zach Toolson](https://github.com/ztoolson) 9 | - Small styling changes, typo fixes, small bug fixes from [Marian Friedmann](https://github.com/rnarian), [Ben Wilhelm](https://github.com/benwilhelm), [Fouad Matin](https://github.com/fouad), [Nicolas Bonduel](https://github.com/NicolasBonduel), [Christian Oliff](https://github.com/coliff) 10 | 11 | Thanks to everyone who submitted PRs for this version! 12 | 13 | ## Version 2.0.0 14 | 15 | *July 17, 2017* 16 | 17 | - All-new statically generated table of contents 18 | - Should be much faster loading and scrolling for large pages 19 | - Smaller Javascript file sizes 20 | - Avoids the problem with the last link in the ToC not ever highlighting if the section was shorter than the page 21 | - Fixes control-click not opening in a new page 22 | - Automatically updates the HTML title as you scroll 23 | - Updated design 24 | - New default colors! 25 | - New spacings and sizes! 26 | - System-default typefaces, just like GitHub 27 | - Added search input delay on large corpuses to reduce lag 28 | - We even bumped the major version cause hey, why not? 29 | - Various small bug fixes 30 | 31 | Thanks to everyone who helped debug or wrote code for this version! It was a serious community effort, and I couldn't have done it alone. 32 | 33 | ## Version 1.5.0 34 | 35 | *February 23, 2017* 36 | 37 | - Add [multiple tabs per programming language](https://github.com/lord/slate/wiki/Multiple-language-tabs-per-programming-language) feature 38 | - Upgrade Middleman to add Ruby 1.4.0 compatibility 39 | - Switch default code highlighting color scheme to better highlight JSON 40 | - Various small typo and bug fixes 41 | 42 | ## Version 1.4.0 43 | 44 | *November 24, 2016* 45 | 46 | - Upgrade Middleman and Rouge gems, should hopefully solve a number of bugs 47 | - Update some links in README 48 | - Fix broken Vagrant startup script 49 | - Fix some problems with deploy.sh help message 50 | - Fix bug with language tabs not hiding properly if no error 51 | - Add `!default` to SASS variables 52 | - Fix bug with logo margin 53 | - Bump tested Ruby versions in .travis.yml 54 | 55 | ## Version 1.3.3 56 | 57 | *June 11, 2016* 58 | 59 | Documentation and example changes. 60 | 61 | ## Version 1.3.2 62 | 63 | *February 3, 2016* 64 | 65 | A small bugfix for slightly incorrect background colors on code samples in some cases. 66 | 67 | ## Version 1.3.1 68 | 69 | *January 31, 2016* 70 | 71 | A small bugfix for incorrect whitespace in code blocks. 72 | 73 | ## Version 1.3 74 | 75 | *January 27, 2016* 76 | 77 | We've upgraded Middleman and a number of other dependencies, which should fix quite a few bugs. 78 | 79 | Instead of `rake build` and `rake deploy`, you should now run `bundle exec middleman build --clean` to build your server, and `./deploy.sh` to deploy it to Github Pages. 80 | 81 | ## Version 1.2 82 | 83 | *June 20, 2015* 84 | 85 | **Fixes:** 86 | 87 | - Remove crash on invalid languages 88 | - Update Tocify to scroll to the highlighted header in the Table of Contents 89 | - Fix variable leak and update search algorithms 90 | - Update Python examples to be valid Python 91 | - Update gems 92 | - More misc. bugfixes of Javascript errors 93 | - Add Dockerfile 94 | - Remove unused gems 95 | - Optimize images, fonts, and generated asset files 96 | - Add chinese font support 97 | - Remove RedCarpet header ID patch 98 | - Update language tabs to not disturb existing query strings 99 | 100 | ## Version 1.1 101 | 102 | *July 27, 2014* 103 | 104 | **Fixes:** 105 | 106 | - Finally, a fix for the redcarpet upgrade bug 107 | 108 | ## Version 1.0 109 | 110 | *July 2, 2014* 111 | 112 | [View Issues](https://github.com/tripit/slate/issues?milestone=1&state=closed) 113 | 114 | **Features:** 115 | 116 | - Responsive designs for phones and tablets 117 | - Started tagging versions 118 | 119 | **Fixes:** 120 | 121 | - Fixed 'unrecognized expression' error 122 | - Fixed #undefined hash bug 123 | - Fixed bug where the current language tab would be unselected 124 | - Fixed bug where tocify wouldn't highlight the current section while searching 125 | - Fixed bug where ids of header tags would have special characters that caused problems 126 | - Updated layout so that pages with disabled search wouldn't load search.js 127 | - Cleaned up Javascript 128 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to API DOC 2 | 3 | Thank you for taking the time to lend a hand with the **api_doc** project ❤️ 4 | 5 | There are several ways you can help the project out: 6 | 7 | * [Contributing code](#contributing-code) 8 | * [Reporting Bugs](#reporting-bugs) 9 | * [Feature Requests and Ideas](#feature-requests-and-ideas) 10 | 11 | ## How Can I Contribute? 12 | 13 | ### Contributing Code 14 | 15 | A lot of our code comes from pull requests sent by the developer community. Here is how you can contribute too: 16 | 17 | - [x] Open the [API DOC GitHub page](https://github.com/DAVFoundation/api_doc) and click the ★ Star and then ⑂ Fork buttons. 18 | - [x] Clone a copy to your local machine with `$ git clone git@github.com:YOUR-GITHUB-USER-NAME/api_doc.git` 19 | - [x] The API documentation is powered by [slate](https://github.com/lord/slate). Follow the instructions from [getting started with slate](https://github.com/lord/slate#getting-started-with-slate). 20 | - [x] Now, make your changes. 21 | - [x] Commit your local changes by using `$ git commit -m "nice detailed message here..."` 22 | - [x] Once you've made sure all your changes work correctly and have been committed, push your local changes back to github with `$ git push -u origin master` 23 | - [x] Visit your fork on GitHub.com ([https://github.com/YOUR-USER-NAME/api_doc](https://github.com/YOUR-USER-NAME/api_doc)) and create a pull request for your changes. 24 | - [x] Makes sure your pull request describes exactly what you changed and if it relates to an open issue, reference that issue (just include the issue number in the title like this: #49) 25 | 26 | #### Important: 27 | 28 | * Please stick to the project's existing coding style. Coding styles don't need to have a consensus, they just need to be consistent :smile: 29 | * Push your changes to a topic branch in your fork of the repository. Your branch should be based on the `master` branch 30 | * When submitting a [pull request](https://help.github.com/articles/using-pull-requests/), please elaborate as much as possible about the change, your motivation for the change, etc. 31 | 32 | ### Reporting Bugs 33 | 34 | Bugs are tracked as [GitHub issues](https://github.com/DAVfoundation/api_doc/issues). If you found a bug with xplore, the quickest way to get help would be to look through existing open and closed [GitHub issues](https://github.com/DAVfoundation/api_doc/issues?q=is%3Aissue). If the issue is already being discussed and hasn't been resolved yet, you can join the discussion and provide details about the problem you are having. If this is a new bug, please open a [new issue](https://github.com/DAVfoundation/api_doc/issues/new). 35 | 36 | When you are creating a bug report, please include as much detail as possible. 37 | 38 | * Fill in the predefined template provided. 39 | * Use a clear and descriptive title for the issue to identify the problem. 40 | * Describe the exact steps which reproduce the problem. Share the relevant code to reproduce the issue if possible. 41 | * Try to isolate the issue as much as possible, reducing unrelated code until you get to the minimal amount of code in which the bug still reproduces. This is the most important step to help the community solve the issue. 42 | 43 | ### Feature Requests and Ideas 44 | 45 | We track discussions of new features, proposed changes, and other ideas as [GitHub issues](https://github.com/DAVfoundation/api_doc/issues). If you would like to discuss one of those, please first look through existing open and closed [GitHub issues](https://github.com/DAVfoundation/api_doc/issues?q=is%3Aissue) and see if there is already a discussion on this topic which you can join. If there isn't, please open a [new issue](https://github.com/DAVfoundation/api_doc/issues/new). 46 | 47 | When discussing new ideas or proposing changes, please take the time to be as descriptive as possible about the topic at hand. Please take the time to explain the issue you are facing, or the problem you propose to solve in as much detail as possible. 48 | 49 | Join the community conversation on Gitter! https://gitter.im/DAVFoundation/DAV-Contributors 50 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | ruby '>=2.3.1' 2 | source 'https://rubygems.org' 3 | 4 | # Middleman 5 | gem 'middleman', '~>4.2.1' 6 | gem 'middleman-syntax', '~> 3.0.0' 7 | gem 'middleman-autoprefixer', '~> 2.7.0' 8 | gem "middleman-sprockets", "~> 4.1.0" 9 | gem 'rouge', '~> 2.0.5' 10 | gem 'redcarpet', '~> 3.4.0' 11 | gem 'nokogiri', '~> 1.6.8' 12 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | activesupport (5.0.6) 5 | concurrent-ruby (~> 1.0, >= 1.0.2) 6 | i18n (~> 0.7) 7 | minitest (~> 5.1) 8 | tzinfo (~> 1.1) 9 | addressable (2.5.2) 10 | public_suffix (>= 2.0.2, < 4.0) 11 | autoprefixer-rails (6.7.7.2) 12 | execjs 13 | backports (3.10.3) 14 | coffee-script (2.4.1) 15 | coffee-script-source 16 | execjs 17 | coffee-script-source (1.12.2) 18 | compass-import-once (1.0.5) 19 | sass (>= 3.2, < 3.5) 20 | concurrent-ruby (1.0.5) 21 | contracts (0.13.0) 22 | dotenv (2.2.1) 23 | erubis (2.7.0) 24 | execjs (2.7.0) 25 | fast_blank (1.0.0) 26 | fastimage (2.1.0) 27 | ffi (1.9.18) 28 | haml (5.0.4) 29 | temple (>= 0.8.0) 30 | tilt 31 | hamster (3.0.0) 32 | concurrent-ruby (~> 1.0) 33 | hashie (3.5.6) 34 | i18n (0.7.0) 35 | kramdown (1.16.2) 36 | listen (3.0.8) 37 | rb-fsevent (~> 0.9, >= 0.9.4) 38 | rb-inotify (~> 0.9, >= 0.9.7) 39 | memoist (0.16.0) 40 | middleman (4.2.1) 41 | coffee-script (~> 2.2) 42 | compass-import-once (= 1.0.5) 43 | haml (>= 4.0.5) 44 | kramdown (~> 1.2) 45 | middleman-cli (= 4.2.1) 46 | middleman-core (= 4.2.1) 47 | sass (>= 3.4.0, < 4.0) 48 | middleman-autoprefixer (2.7.1) 49 | autoprefixer-rails (>= 6.5.2, < 7.0.0) 50 | middleman-core (>= 3.3.3) 51 | middleman-cli (4.2.1) 52 | thor (>= 0.17.0, < 2.0) 53 | middleman-core (4.2.1) 54 | activesupport (>= 4.2, < 5.1) 55 | addressable (~> 2.3) 56 | backports (~> 3.6) 57 | bundler (~> 1.1) 58 | contracts (~> 0.13.0) 59 | dotenv 60 | erubis 61 | execjs (~> 2.0) 62 | fast_blank 63 | fastimage (~> 2.0) 64 | hamster (~> 3.0) 65 | hashie (~> 3.4) 66 | i18n (~> 0.7.0) 67 | listen (~> 3.0.0) 68 | memoist (~> 0.14) 69 | padrino-helpers (~> 0.13.0) 70 | parallel 71 | rack (>= 1.4.5, < 3) 72 | sass (>= 3.4) 73 | servolux 74 | tilt (~> 2.0) 75 | uglifier (~> 3.0) 76 | middleman-sprockets (4.1.1) 77 | middleman-core (~> 4.0) 78 | sprockets (>= 3.0) 79 | middleman-syntax (3.0.0) 80 | middleman-core (>= 3.2) 81 | rouge (~> 2.0) 82 | mini_portile2 (2.1.0) 83 | minitest (5.10.3) 84 | nokogiri (1.6.8.1) 85 | mini_portile2 (~> 2.1.0) 86 | padrino-helpers (0.13.3.4) 87 | i18n (~> 0.6, >= 0.6.7) 88 | padrino-support (= 0.13.3.4) 89 | tilt (>= 1.4.1, < 3) 90 | padrino-support (0.13.3.4) 91 | activesupport (>= 3.1) 92 | parallel (1.12.0) 93 | public_suffix (3.0.1) 94 | rack (2.0.3) 95 | rb-fsevent (0.10.2) 96 | rb-inotify (0.9.10) 97 | ffi (>= 0.5.0, < 2) 98 | redcarpet (3.4.0) 99 | rouge (2.0.7) 100 | sass (3.4.25) 101 | servolux (0.13.0) 102 | sprockets (3.7.1) 103 | concurrent-ruby (~> 1.0) 104 | rack (> 1, < 3) 105 | temple (0.8.0) 106 | thor (0.20.0) 107 | thread_safe (0.3.6) 108 | tilt (2.0.8) 109 | tzinfo (1.2.4) 110 | thread_safe (~> 0.1) 111 | uglifier (3.2.0) 112 | execjs (>= 0.3.0, < 3) 113 | 114 | PLATFORMS 115 | ruby 116 | 117 | DEPENDENCIES 118 | middleman (~> 4.2.1) 119 | middleman-autoprefixer (~> 2.7.0) 120 | middleman-sprockets (~> 4.1.0) 121 | middleman-syntax (~> 3.0.0) 122 | nokogiri (~> 1.6.8) 123 | redcarpet (~> 3.4.0) 124 | rouge (~> 2.0.5) 125 | 126 | RUBY VERSION 127 | ruby 2.3.3p222 128 | 129 | BUNDLED WITH 130 | 2.0.2 131 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2018 DAV Foundation 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | FORCE: 2 | 3 | start: FORCE 4 | bundle exec middleman server 5 | 6 | deploy: FORCE 7 | ./deploy.sh 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DAV Developer Portal 2 | [![Gitter](https://img.shields.io/gitter/room/DAVFoundation/DAV-Contributors.svg?style=flat-square)](https://gitter.im/DAVFoundation/DAV-Contributors) [![license](https://img.shields.io/github/license/DAVFoundation/api_doc.svg?style=flat-square)](https://github.com/DAVFoundation/api_doc/blob/master/LICENSE) 3 | 4 | 5 | Welcome to the DAV Developer Portal. 6 | Here you will find instructions for running our command line interface, and our various communication protocols. 7 | 8 | Visit our portal: https://developers.dav.network/ 9 | 10 | ## Under the hood 11 | 12 | The DAV Developer Portal is powered by [slate](https://github.com/lord/slate). 13 | 14 | 15 | -------------------------------------------------------------------------------- /Vagrantfile: -------------------------------------------------------------------------------- 1 | Vagrant.configure(2) do |config| 2 | config.vm.box = "ubuntu/trusty64" 3 | config.vm.network :forwarded_port, guest: 4567, host: 4567 4 | 5 | config.vm.provision "bootstrap", 6 | type: "shell", 7 | inline: <<-SHELL 8 | sudo apt-add-repository ppa:brightbox/ruby-ng 9 | sudo apt-get update 10 | sudo apt-get install -yq ruby2.4 ruby2.4-dev 11 | sudo apt-get install -yq pkg-config build-essential nodejs git libxml2-dev libxslt-dev 12 | sudo apt-get autoremove -yq 13 | gem2.4 install --no-ri --no-rdoc bundler 14 | SHELL 15 | 16 | # add the local user git config to the vm 17 | config.vm.provision "file", source: "~/.gitconfig", destination: ".gitconfig" 18 | 19 | config.vm.provision "install", 20 | type: "shell", 21 | privileged: false, 22 | inline: <<-SHELL 23 | echo "==============================================" 24 | echo "Installing app dependencies" 25 | cd /vagrant 26 | bundle config build.nokogiri --use-system-libraries 27 | bundle install 28 | SHELL 29 | 30 | config.vm.provision "run", 31 | type: "shell", 32 | privileged: false, 33 | run: "always", 34 | inline: <<-SHELL 35 | echo "==============================================" 36 | echo "Starting up middleman at http://localhost:4567" 37 | echo "If it does not come up, check the ~/middleman.log file for any error messages" 38 | cd /vagrant 39 | bundle exec middleman server --watcher-force-polling --watcher-latency=1 &> ~/middleman.log & 40 | SHELL 41 | end -------------------------------------------------------------------------------- /code_of_conduct.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. 6 | 7 | ## Our Standards 8 | 9 | Examples of behavior that contributes to creating a positive environment include: 10 | 11 | * Using welcoming and inclusive language 12 | * Being respectful of differing viewpoints and experiences 13 | * Gracefully accepting constructive criticism 14 | * Focusing on what is best for the community 15 | * Showing empathy towards other community members 16 | 17 | Examples of unacceptable behavior by participants include: 18 | 19 | * The use of sexualized language or imagery and unwelcome sexual attention or advances 20 | * Trolling, insulting/derogatory comments, and personal or political attacks 21 | * Public or private harassment 22 | * Publishing others' private information, such as a physical or electronic address, without explicit permission 23 | * Other conduct which could reasonably be considered inappropriate in a professional setting 24 | 25 | ## Our Responsibilities 26 | 27 | Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. 28 | 29 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. 30 | 31 | ## Scope 32 | 33 | This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. 34 | 35 | ## Enforcement 36 | 37 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at tal@dav.network. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. 38 | 39 | Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. 40 | 41 | ## Attribution 42 | 43 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] 44 | 45 | [homepage]: http://contributor-covenant.org 46 | [version]: http://contributor-covenant.org/version/1/4/ 47 | -------------------------------------------------------------------------------- /config.rb: -------------------------------------------------------------------------------- 1 | # Unique header generation 2 | require './lib/unique_head.rb' 3 | 4 | # Markdown 5 | set :markdown_engine, :redcarpet 6 | set :markdown, 7 | fenced_code_blocks: true, 8 | smartypants: true, 9 | disable_indented_code_blocks: true, 10 | prettify: true, 11 | tables: true, 12 | with_toc_data: true, 13 | no_intra_emphasis: true, 14 | renderer: UniqueHeadCounter 15 | 16 | # Assets 17 | set :css_dir, 'stylesheets' 18 | set :js_dir, 'javascripts' 19 | set :images_dir, 'images' 20 | set :fonts_dir, 'fonts' 21 | 22 | # Activate the syntax highlighter 23 | activate :syntax 24 | ready do 25 | require './lib/multilang.rb' 26 | end 27 | 28 | activate :sprockets 29 | 30 | activate :autoprefixer do |config| 31 | config.browsers = ['last 2 version', 'Firefox ESR'] 32 | config.cascade = false 33 | config.inline = true 34 | end 35 | 36 | # Github pages require relative links 37 | activate :relative_assets 38 | set :relative_links, true 39 | 40 | # Build Configuration 41 | configure :build do 42 | # If you're having trouble with Middleman hanging, commenting 43 | # out the following two lines has been known to help 44 | activate :minify_css 45 | activate :minify_javascript 46 | # activate :relative_assets 47 | # activate :asset_hash 48 | # activate :gzip 49 | end 50 | 51 | # Deploy Configuration 52 | # If you want Middleman to listen on a different port, you can set that below 53 | set :port, 4567 54 | 55 | helpers do 56 | require './lib/toc_data.rb' 57 | end 58 | -------------------------------------------------------------------------------- /deploy.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -o errexit #abort if any command fails 3 | me=$(basename "$0") 4 | 5 | help_message="\ 6 | Usage: $me [-c FILE] [] 7 | Deploy generated files to a git branch. 8 | 9 | Options: 10 | 11 | -h, --help Show this help information. 12 | -v, --verbose Increase verbosity. Useful for debugging. 13 | -e, --allow-empty Allow deployment of an empty directory. 14 | -m, --message MESSAGE Specify the message used when committing on the 15 | deploy branch. 16 | -n, --no-hash Don't append the source commit's hash to the deploy 17 | commit's message. 18 | --source-only Only build but not push 19 | --push-only Only push but not build 20 | " 21 | 22 | 23 | run_build() { 24 | bundle exec middleman build --clean 25 | } 26 | 27 | parse_args() { 28 | # Set args from a local environment file. 29 | if [ -e ".env" ]; then 30 | source .env 31 | fi 32 | 33 | # Parse arg flags 34 | # If something is exposed as an environment variable, set/overwrite it 35 | # here. Otherwise, set/overwrite the internal variable instead. 36 | while : ; do 37 | if [[ $1 = "-h" || $1 = "--help" ]]; then 38 | echo "$help_message" 39 | return 0 40 | elif [[ $1 = "-v" || $1 = "--verbose" ]]; then 41 | verbose=true 42 | shift 43 | elif [[ $1 = "-e" || $1 = "--allow-empty" ]]; then 44 | allow_empty=true 45 | shift 46 | elif [[ ( $1 = "-m" || $1 = "--message" ) && -n $2 ]]; then 47 | commit_message=$2 48 | shift 2 49 | elif [[ $1 = "-n" || $1 = "--no-hash" ]]; then 50 | GIT_DEPLOY_APPEND_HASH=false 51 | shift 52 | else 53 | break 54 | fi 55 | done 56 | 57 | # Set internal option vars from the environment and arg flags. All internal 58 | # vars should be declared here, with sane defaults if applicable. 59 | 60 | # Source directory & target branch. 61 | deploy_directory=build 62 | deploy_branch=gh-pages 63 | 64 | #if no user identity is already set in the current git environment, use this: 65 | default_username=${GIT_DEPLOY_USERNAME:-deploy.sh} 66 | default_email=${GIT_DEPLOY_EMAIL:-} 67 | 68 | #repository to deploy to. must be readable and writable. 69 | repo=origin 70 | 71 | #append commit hash to the end of message by default 72 | append_hash=${GIT_DEPLOY_APPEND_HASH:-true} 73 | } 74 | 75 | main() { 76 | parse_args "$@" 77 | 78 | enable_expanded_output 79 | 80 | if ! git diff --exit-code --quiet --cached; then 81 | echo Aborting due to uncommitted changes in the index >&2 82 | return 1 83 | fi 84 | 85 | commit_title=`git log -n 1 --format="%s" HEAD` 86 | commit_hash=` git log -n 1 --format="%H" HEAD` 87 | 88 | #default commit message uses last title if a custom one is not supplied 89 | if [[ -z $commit_message ]]; then 90 | commit_message="publish: $commit_title" 91 | fi 92 | 93 | #append hash to commit message unless no hash flag was found 94 | if [ $append_hash = true ]; then 95 | commit_message="$commit_message"$'\n\n'"generated from commit $commit_hash" 96 | fi 97 | 98 | previous_branch=`git rev-parse --abbrev-ref HEAD` 99 | 100 | if [ ! -d "$deploy_directory" ]; then 101 | echo "Deploy directory '$deploy_directory' does not exist. Aborting." >&2 102 | return 1 103 | fi 104 | 105 | # must use short form of flag in ls for compatibility with OS X and BSD 106 | if [[ -z `ls -A "$deploy_directory" 2> /dev/null` && -z $allow_empty ]]; then 107 | echo "Deploy directory '$deploy_directory' is empty. Aborting. If you're sure you want to deploy an empty tree, use the --allow-empty / -e flag." >&2 108 | return 1 109 | fi 110 | 111 | if git ls-remote --exit-code $repo "refs/heads/$deploy_branch" ; then 112 | # deploy_branch exists in $repo; make sure we have the latest version 113 | 114 | disable_expanded_output 115 | git fetch --force $repo $deploy_branch:$deploy_branch 116 | enable_expanded_output 117 | fi 118 | 119 | # check if deploy_branch exists locally 120 | if git show-ref --verify --quiet "refs/heads/$deploy_branch" 121 | then incremental_deploy 122 | else initial_deploy 123 | fi 124 | 125 | restore_head 126 | } 127 | 128 | initial_deploy() { 129 | git --work-tree "$deploy_directory" checkout --orphan $deploy_branch 130 | git --work-tree "$deploy_directory" add --all 131 | commit+push 132 | } 133 | 134 | incremental_deploy() { 135 | #make deploy_branch the current branch 136 | git symbolic-ref HEAD refs/heads/$deploy_branch 137 | #put the previously committed contents of deploy_branch into the index 138 | git --work-tree "$deploy_directory" reset --mixed --quiet 139 | git --work-tree "$deploy_directory" add --all 140 | 141 | set +o errexit 142 | diff=$(git --work-tree "$deploy_directory" diff --exit-code --quiet HEAD --)$? 143 | set -o errexit 144 | case $diff in 145 | 0) echo No changes to files in $deploy_directory. Skipping commit.;; 146 | 1) commit+push;; 147 | *) 148 | echo git diff exited with code $diff. Aborting. Staying on branch $deploy_branch so you can debug. To switch back to master, use: git symbolic-ref HEAD refs/heads/master && git reset --mixed >&2 149 | return $diff 150 | ;; 151 | esac 152 | } 153 | 154 | commit+push() { 155 | set_user_id 156 | git --work-tree "$deploy_directory" commit -m "$commit_message" 157 | 158 | disable_expanded_output 159 | #--quiet is important here to avoid outputting the repo URL, which may contain a secret token 160 | git push --quiet $repo $deploy_branch 161 | enable_expanded_output 162 | } 163 | 164 | #echo expanded commands as they are executed (for debugging) 165 | enable_expanded_output() { 166 | if [ $verbose ]; then 167 | set -o xtrace 168 | set +o verbose 169 | fi 170 | } 171 | 172 | #this is used to avoid outputting the repo URL, which may contain a secret token 173 | disable_expanded_output() { 174 | if [ $verbose ]; then 175 | set +o xtrace 176 | set -o verbose 177 | fi 178 | } 179 | 180 | set_user_id() { 181 | if [[ -z `git config user.name` ]]; then 182 | git config user.name "$default_username" 183 | fi 184 | if [[ -z `git config user.email` ]]; then 185 | git config user.email "$default_email" 186 | fi 187 | } 188 | 189 | restore_head() { 190 | if [[ $previous_branch = "HEAD" ]]; then 191 | #we weren't on any branch before, so just set HEAD back to the commit it was on 192 | git update-ref --no-deref HEAD $commit_hash $deploy_branch 193 | else 194 | git symbolic-ref HEAD refs/heads/$previous_branch 195 | fi 196 | 197 | git reset --mixed 198 | } 199 | 200 | filter() { 201 | sed -e "s|$repo|\$repo|g" 202 | } 203 | 204 | sanitize() { 205 | "$@" 2> >(filter 1>&2) | filter 206 | } 207 | 208 | if [[ $1 = --source-only ]]; then 209 | run_build 210 | elif [[ $1 = --push-only ]]; then 211 | main "$@" 212 | else 213 | run_build 214 | main "$@" 215 | fi 216 | -------------------------------------------------------------------------------- /font-selection.json: -------------------------------------------------------------------------------- 1 | { 2 | "IcoMoonType": "selection", 3 | "icons": [ 4 | { 5 | "icon": { 6 | "paths": [ 7 | "M438.857 73.143q119.429 0 220.286 58.857t159.714 159.714 58.857 220.286-58.857 220.286-159.714 159.714-220.286 58.857-220.286-58.857-159.714-159.714-58.857-220.286 58.857-220.286 159.714-159.714 220.286-58.857zM512 785.714v-108.571q0-8-5.143-13.429t-12.571-5.429h-109.714q-7.429 0-13.143 5.714t-5.714 13.143v108.571q0 7.429 5.714 13.143t13.143 5.714h109.714q7.429 0 12.571-5.429t5.143-13.429zM510.857 589.143l10.286-354.857q0-6.857-5.714-10.286-5.714-4.571-13.714-4.571h-125.714q-8 0-13.714 4.571-5.714 3.429-5.714 10.286l9.714 354.857q0 5.714 5.714 10t13.714 4.286h105.714q8 0 13.429-4.286t6-10z" 8 | ], 9 | "attrs": [], 10 | "isMulticolor": false, 11 | "tags": [ 12 | "exclamation-circle" 13 | ], 14 | "defaultCode": 61546, 15 | "grid": 14 16 | }, 17 | "attrs": [], 18 | "properties": { 19 | "id": 100, 20 | "order": 4, 21 | "prevSize": 28, 22 | "code": 58880, 23 | "name": "exclamation-sign", 24 | "ligatures": "" 25 | }, 26 | "setIdx": 0, 27 | "iconIdx": 0 28 | }, 29 | { 30 | "icon": { 31 | "paths": [ 32 | "M585.143 786.286v-91.429q0-8-5.143-13.143t-13.143-5.143h-54.857v-292.571q0-8-5.143-13.143t-13.143-5.143h-182.857q-8 0-13.143 5.143t-5.143 13.143v91.429q0 8 5.143 13.143t13.143 5.143h54.857v182.857h-54.857q-8 0-13.143 5.143t-5.143 13.143v91.429q0 8 5.143 13.143t13.143 5.143h256q8 0 13.143-5.143t5.143-13.143zM512 274.286v-91.429q0-8-5.143-13.143t-13.143-5.143h-109.714q-8 0-13.143 5.143t-5.143 13.143v91.429q0 8 5.143 13.143t13.143 5.143h109.714q8 0 13.143-5.143t5.143-13.143zM877.714 512q0 119.429-58.857 220.286t-159.714 159.714-220.286 58.857-220.286-58.857-159.714-159.714-58.857-220.286 58.857-220.286 159.714-159.714 220.286-58.857 220.286 58.857 159.714 159.714 58.857 220.286z" 33 | ], 34 | "attrs": [], 35 | "isMulticolor": false, 36 | "tags": [ 37 | "info-circle" 38 | ], 39 | "defaultCode": 61530, 40 | "grid": 14 41 | }, 42 | "attrs": [], 43 | "properties": { 44 | "id": 85, 45 | "order": 3, 46 | "name": "info-sign", 47 | "prevSize": 28, 48 | "code": 58882 49 | }, 50 | "setIdx": 0, 51 | "iconIdx": 2 52 | }, 53 | { 54 | "icon": { 55 | "paths": [ 56 | "M733.714 419.429q0-16-10.286-26.286l-52-51.429q-10.857-10.857-25.714-10.857t-25.714 10.857l-233.143 232.571-129.143-129.143q-10.857-10.857-25.714-10.857t-25.714 10.857l-52 51.429q-10.286 10.286-10.286 26.286 0 15.429 10.286 25.714l206.857 206.857q10.857 10.857 25.714 10.857 15.429 0 26.286-10.857l310.286-310.286q10.286-10.286 10.286-25.714zM877.714 512q0 119.429-58.857 220.286t-159.714 159.714-220.286 58.857-220.286-58.857-159.714-159.714-58.857-220.286 58.857-220.286 159.714-159.714 220.286-58.857 220.286 58.857 159.714 159.714 58.857 220.286z" 57 | ], 58 | "attrs": [], 59 | "isMulticolor": false, 60 | "tags": [ 61 | "check-circle" 62 | ], 63 | "defaultCode": 61528, 64 | "grid": 14 65 | }, 66 | "attrs": [], 67 | "properties": { 68 | "id": 83, 69 | "order": 9, 70 | "prevSize": 28, 71 | "code": 58886, 72 | "name": "ok-sign" 73 | }, 74 | "setIdx": 0, 75 | "iconIdx": 6 76 | }, 77 | { 78 | "icon": { 79 | "paths": [ 80 | "M658.286 475.429q0-105.714-75.143-180.857t-180.857-75.143-180.857 75.143-75.143 180.857 75.143 180.857 180.857 75.143 180.857-75.143 75.143-180.857zM950.857 950.857q0 29.714-21.714 51.429t-51.429 21.714q-30.857 0-51.429-21.714l-196-195.429q-102.286 70.857-228 70.857-81.714 0-156.286-31.714t-128.571-85.714-85.714-128.571-31.714-156.286 31.714-156.286 85.714-128.571 128.571-85.714 156.286-31.714 156.286 31.714 128.571 85.714 85.714 128.571 31.714 156.286q0 125.714-70.857 228l196 196q21.143 21.143 21.143 51.429z" 81 | ], 82 | "width": 951, 83 | "attrs": [], 84 | "isMulticolor": false, 85 | "tags": [ 86 | "search" 87 | ], 88 | "defaultCode": 61442, 89 | "grid": 14 90 | }, 91 | "attrs": [], 92 | "properties": { 93 | "id": 2, 94 | "order": 1, 95 | "prevSize": 28, 96 | "code": 58887, 97 | "name": "icon-search" 98 | }, 99 | "setIdx": 0, 100 | "iconIdx": 7 101 | } 102 | ], 103 | "height": 1024, 104 | "metadata": { 105 | "name": "slate", 106 | "license": "SIL OFL 1.1" 107 | }, 108 | "preferences": { 109 | "showGlyphs": true, 110 | "showQuickUse": true, 111 | "showQuickUse2": true, 112 | "showSVGs": true, 113 | "fontPref": { 114 | "prefix": "icon-", 115 | "metadata": { 116 | "fontFamily": "slate", 117 | "majorVersion": 1, 118 | "minorVersion": 0, 119 | "description": "Based on FontAwesome", 120 | "license": "SIL OFL 1.1" 121 | }, 122 | "metrics": { 123 | "emSize": 1024, 124 | "baseline": 6.25, 125 | "whitespace": 50 126 | }, 127 | "resetPoint": 58880, 128 | "showSelector": false, 129 | "selector": "class", 130 | "classSelector": ".icon", 131 | "showMetrics": false, 132 | "showMetadata": true, 133 | "showVersion": true, 134 | "ie7": false 135 | }, 136 | "imagePref": { 137 | "prefix": "icon-", 138 | "png": true, 139 | "useClassSelector": true, 140 | "color": 4473924, 141 | "bgColor": 16777215 142 | }, 143 | "historySize": 100, 144 | "showCodes": true, 145 | "gridSize": 16, 146 | "showLiga": false 147 | } 148 | } 149 | -------------------------------------------------------------------------------- /lib/multilang.rb: -------------------------------------------------------------------------------- 1 | module Multilang 2 | def block_code(code, full_lang_name) 3 | if full_lang_name 4 | parts = full_lang_name.split('--') 5 | rouge_lang_name = (parts) ? parts[0] : "" # just parts[0] here causes null ref exception when no language specified 6 | super(code, rouge_lang_name).sub("highlight #{rouge_lang_name}") do |match| 7 | match + " tab-" + full_lang_name 8 | end 9 | else 10 | super(code, full_lang_name) 11 | end 12 | end 13 | end 14 | 15 | require 'middleman-core/renderers/redcarpet' 16 | Middleman::Renderers::MiddlemanRedcarpetHTML.send :include, Multilang 17 | -------------------------------------------------------------------------------- /lib/toc_data.rb: -------------------------------------------------------------------------------- 1 | require 'nokogiri' 2 | 3 | def toc_data(page_content) 4 | html_doc = Nokogiri::HTML::DocumentFragment.parse(page_content) 5 | 6 | # get a flat list of headers 7 | headers = [] 8 | html_doc.css('h1, h2, h3').each do |header| 9 | headers.push({ 10 | id: header.attribute('id').to_s, 11 | content: header.children, 12 | level: header.name[1].to_i, 13 | children: [] 14 | }) 15 | end 16 | 17 | [3,2].each do |header_level| 18 | header_to_nest = nil 19 | headers = headers.reject do |header| 20 | if header[:level] == header_level 21 | header_to_nest[:children].push header if header_to_nest 22 | true 23 | else 24 | header_to_nest = header if header[:level] < header_level 25 | false 26 | end 27 | end 28 | end 29 | headers 30 | end -------------------------------------------------------------------------------- /lib/unique_head.rb: -------------------------------------------------------------------------------- 1 | # Unique header generation 2 | require 'middleman-core/renderers/redcarpet' 3 | class UniqueHeadCounter < Middleman::Renderers::MiddlemanRedcarpetHTML 4 | def initialize 5 | super 6 | @head_count = {} 7 | end 8 | def header(text, header_level) 9 | friendly_text = text.parameterize 10 | @head_count[friendly_text] ||= 0 11 | @head_count[friendly_text] += 1 12 | if @head_count[friendly_text] > 1 13 | friendly_text += "-#{@head_count[friendly_text]}" 14 | end 15 | return "#{text}" 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "lockfileVersion": 1 3 | } 4 | -------------------------------------------------------------------------------- /source/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 404 Not Found 6 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /source/CNAME: -------------------------------------------------------------------------------- 1 | developers.dav.network 2 | -------------------------------------------------------------------------------- /source/dav-cli/user-guide/index.html.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: DAV CLI User Guide 3 | 4 | toc_footers: 5 | - Documentation powered by Slate. 6 | 7 | search: true 8 | --- 9 | 10 |

DAV CLI User Guide

11 | 12 | # DAV CLI User Guide 13 | 14 | This is the user guide for the DAV Command Line Interface (CLI). 15 | 16 | DAV CLI is written in and installed using Node.js but is useful not just for Node.js or JavaScript development. 17 | 18 | # Installation 19 | 20 | Before you get started, make sure you have Node version 8 and up and npm or Yarn installed. 21 | 22 | 30 | 31 | # Usage 32 | 33 | The following table describes the various options that are available using the DAV CLI (You can also view them by running the command dav-cli): 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 |
CommandDescription
-V or --versionOutput the version number
-s or --versionStart a local Ethereum node
-p or --port <n>Port for Ethereum node to listen to
--genkey <s>Generate a private-public key pair for a new Identity
-r or --register <s>Register a new Identity on the blockchain
-h or --helpOutput usage information
66 | 67 | ### Examples 68 | 69 | To start a local Ethereum node on the default port: 70 | 71 |

$ dav-cli --start

72 | 73 | Start a local Ethereum node on port 1234: 74 | 75 |

$ dav-cli --start --port 1234

76 | 77 | Generate a new private-public key pair and save it to the ~/.dav directory: 78 | 79 |

$ dav-cli --genkey ~/.dav

80 | 81 | Register a new Identity on the blockchain: 82 | 83 |

$ dav-cli --register ~/.dav/0xd14e3aca4d62c8e7b150fc63dabb8fb4b3485263

84 | -------------------------------------------------------------------------------- /source/fonts/slate.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DAVFoundation/api_doc/b0e4306e309b729a33ad669e5da965f5380daa5c/source/fonts/slate.eot -------------------------------------------------------------------------------- /source/fonts/slate.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Generated by IcoMoon 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /source/fonts/slate.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DAVFoundation/api_doc/b0e4306e309b729a33ad669e5da965f5380daa5c/source/fonts/slate.ttf -------------------------------------------------------------------------------- /source/fonts/slate.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DAVFoundation/api_doc/b0e4306e309b729a33ad669e5da965f5380daa5c/source/fonts/slate.woff -------------------------------------------------------------------------------- /source/fonts/slate.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DAVFoundation/api_doc/b0e4306e309b729a33ad669e5da965f5380daa5c/source/fonts/slate.woff2 -------------------------------------------------------------------------------- /source/images/car_parking/header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DAVFoundation/api_doc/b0e4306e309b729a33ad669e5da965f5380daa5c/source/images/car_parking/header.png -------------------------------------------------------------------------------- /source/images/cargo_insurance/header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DAVFoundation/api_doc/b0e4306e309b729a33ad669e5da965f5380daa5c/source/images/cargo_insurance/header.png -------------------------------------------------------------------------------- /source/images/dav-portal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DAVFoundation/api_doc/b0e4306e309b729a33ad669e5da965f5380daa5c/source/images/dav-portal.png -------------------------------------------------------------------------------- /source/images/dav_cli/header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DAVFoundation/api_doc/b0e4306e309b729a33ad669e5da965f5380daa5c/source/images/dav_cli/header.png -------------------------------------------------------------------------------- /source/images/drone_charging/header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DAVFoundation/api_doc/b0e4306e309b729a33ad669e5da965f5380daa5c/source/images/drone_charging/header.png -------------------------------------------------------------------------------- /source/images/drone_delivery/header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DAVFoundation/api_doc/b0e4306e309b729a33ad669e5da965f5380daa5c/source/images/drone_delivery/header.png -------------------------------------------------------------------------------- /source/images/ev_charging/header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DAVFoundation/api_doc/b0e4306e309b729a33ad669e5da965f5380daa5c/source/images/ev_charging/header.png -------------------------------------------------------------------------------- /source/images/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DAVFoundation/api_doc/b0e4306e309b729a33ad669e5da965f5380daa5c/source/images/favicon.png -------------------------------------------------------------------------------- /source/images/header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DAVFoundation/api_doc/b0e4306e309b729a33ad669e5da965f5380daa5c/source/images/header.png -------------------------------------------------------------------------------- /source/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DAVFoundation/api_doc/b0e4306e309b729a33ad669e5da965f5380daa5c/source/images/logo.png -------------------------------------------------------------------------------- /source/images/navbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DAVFoundation/api_doc/b0e4306e309b729a33ad669e5da965f5380daa5c/source/images/navbar.png -------------------------------------------------------------------------------- /source/images/photo_shooting/header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DAVFoundation/api_doc/b0e4306e309b729a33ad669e5da965f5380daa5c/source/images/photo_shooting/header.png -------------------------------------------------------------------------------- /source/images/ride_hailing/header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DAVFoundation/api_doc/b0e4306e309b729a33ad669e5da965f5380daa5c/source/images/ride_hailing/header.png -------------------------------------------------------------------------------- /source/images/route_planning/header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DAVFoundation/api_doc/b0e4306e309b729a33ad669e5da965f5380daa5c/source/images/route_planning/header.png -------------------------------------------------------------------------------- /source/images/thumbnails/car_parking_thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DAVFoundation/api_doc/b0e4306e309b729a33ad669e5da965f5380daa5c/source/images/thumbnails/car_parking_thumbnail.png -------------------------------------------------------------------------------- /source/images/thumbnails/cargo_insurance_thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DAVFoundation/api_doc/b0e4306e309b729a33ad669e5da965f5380daa5c/source/images/thumbnails/cargo_insurance_thumbnail.png -------------------------------------------------------------------------------- /source/images/thumbnails/cli_user_guide_tumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DAVFoundation/api_doc/b0e4306e309b729a33ad669e5da965f5380daa5c/source/images/thumbnails/cli_user_guide_tumbnail.png -------------------------------------------------------------------------------- /source/images/thumbnails/drone_charging_thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DAVFoundation/api_doc/b0e4306e309b729a33ad669e5da965f5380daa5c/source/images/thumbnails/drone_charging_thumbnail.png -------------------------------------------------------------------------------- /source/images/thumbnails/drone_delivery_thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DAVFoundation/api_doc/b0e4306e309b729a33ad669e5da965f5380daa5c/source/images/thumbnails/drone_delivery_thumbnail.png -------------------------------------------------------------------------------- /source/images/thumbnails/ev_charging_thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DAVFoundation/api_doc/b0e4306e309b729a33ad669e5da965f5380daa5c/source/images/thumbnails/ev_charging_thumbnail.png -------------------------------------------------------------------------------- /source/images/thumbnails/photo_shooting_thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DAVFoundation/api_doc/b0e4306e309b729a33ad669e5da965f5380daa5c/source/images/thumbnails/photo_shooting_thumbnail.png -------------------------------------------------------------------------------- /source/images/thumbnails/ride_hailing_thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DAVFoundation/api_doc/b0e4306e309b729a33ad669e5da965f5380daa5c/source/images/thumbnails/ride_hailing_thumbnail.png -------------------------------------------------------------------------------- /source/images/thumbnails/route_planning_thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DAVFoundation/api_doc/b0e4306e309b729a33ad669e5da965f5380daa5c/source/images/thumbnails/route_planning_thumbnail.png -------------------------------------------------------------------------------- /source/images/thumbnails/vehicle_locating_thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DAVFoundation/api_doc/b0e4306e309b729a33ad669e5da965f5380daa5c/source/images/thumbnails/vehicle_locating_thumbnail.png -------------------------------------------------------------------------------- /source/images/thumbnails/vessel_charging_thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DAVFoundation/api_doc/b0e4306e309b729a33ad669e5da965f5380daa5c/source/images/thumbnails/vessel_charging_thumbnail.png -------------------------------------------------------------------------------- /source/images/vehicle_locating/header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DAVFoundation/api_doc/b0e4306e309b729a33ad669e5da965f5380daa5c/source/images/vehicle_locating/header.png -------------------------------------------------------------------------------- /source/images/vessel_charging/header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DAVFoundation/api_doc/b0e4306e309b729a33ad669e5da965f5380daa5c/source/images/vessel_charging/header.png -------------------------------------------------------------------------------- /source/index.html.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: DAV Developer Portal 3 | 4 | search: false 5 | --- 6 | 7 |

DAV Developer Portal

8 | 9 | # DAV Developer Portal 10 | 11 | Welcome to the DAV Developer Portal. 12 | 13 | Here you will find instructions for running our command line interface, and our various communication protocols. 14 | 15 | # Command Line Interface 16 | 17 | The DAV Command Line Interface was created to ease the development of applications and solutions that interact with DAV, and allow you to: 18 | 19 | 24 | 25 | 28 | 29 | # Communication Protocols 30 | 31 | The following protocols govern the communication between different vehicles, services, users, and applications using DAV. 32 | 33 | 45 | 46 | # Contribution 47 | 48 | The communication protocols are based on the work of researchers and engineers in many countries. They are an open living standard by the community, for the community. 49 | 50 | We invite you to join and contribute to them on GitHub. 51 | -------------------------------------------------------------------------------- /source/javascripts/all.js: -------------------------------------------------------------------------------- 1 | //= require ./all_nosearch 2 | //= require ./app/_search 3 | -------------------------------------------------------------------------------- /source/javascripts/all_nosearch.js: -------------------------------------------------------------------------------- 1 | //= require ./lib/_energize 2 | //= require ./app/_toc 3 | //= require ./app/_lang 4 | 5 | $(function() { 6 | loadToc($('#toc'), '.toc-link', '.toc-list-h2', 10); 7 | setupLanguages($('body').data('languages')); 8 | $('.content').imagesLoaded( function() { 9 | window.recacheHeights(); 10 | window.refreshToc(); 11 | }); 12 | }); 13 | 14 | window.onpopstate = function() { 15 | activateLanguage(getLanguageFromQueryString()); 16 | }; 17 | -------------------------------------------------------------------------------- /source/javascripts/app/_lang.js: -------------------------------------------------------------------------------- 1 | //= require ../lib/_jquery 2 | 3 | /* 4 | Copyright 2008-2013 Concur Technologies, Inc. 5 | 6 | Licensed under the Apache License, Version 2.0 (the "License"); you may 7 | not use this file except in compliance with the License. You may obtain 8 | a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, software 13 | distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 14 | WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 15 | License for the specific language governing permissions and limitations 16 | under the License. 17 | */ 18 | ;(function () { 19 | 'use strict'; 20 | 21 | var languages = []; 22 | 23 | window.setupLanguages = setupLanguages; 24 | window.activateLanguage = activateLanguage; 25 | window.getLanguageFromQueryString = getLanguageFromQueryString; 26 | 27 | function activateLanguage(language) { 28 | if (!language) return; 29 | if (language === "") return; 30 | 31 | $(".lang-selector a").removeClass('active'); 32 | $(".lang-selector a[data-language-name='" + language + "']").addClass('active'); 33 | for (var i=0; i < languages.length; i++) { 34 | $(".highlight.tab-" + languages[i]).hide(); 35 | $(".lang-specific." + languages[i]).hide(); 36 | } 37 | $(".highlight.tab-" + language).show(); 38 | $(".lang-specific." + language).show(); 39 | 40 | window.recacheHeights(); 41 | 42 | // scroll to the new location of the position 43 | if ($(window.location.hash).get(0)) { 44 | $(window.location.hash).get(0).scrollIntoView(true); 45 | } 46 | } 47 | 48 | // parseURL and stringifyURL are from https://github.com/sindresorhus/query-string 49 | // MIT licensed 50 | // https://github.com/sindresorhus/query-string/blob/7bee64c16f2da1a326579e96977b9227bf6da9e6/license 51 | function parseURL(str) { 52 | if (typeof str !== 'string') { 53 | return {}; 54 | } 55 | 56 | str = str.trim().replace(/^(\?|#|&)/, ''); 57 | 58 | if (!str) { 59 | return {}; 60 | } 61 | 62 | return str.split('&').reduce(function (ret, param) { 63 | var parts = param.replace(/\+/g, ' ').split('='); 64 | var key = parts[0]; 65 | var val = parts[1]; 66 | 67 | key = decodeURIComponent(key); 68 | // missing `=` should be `null`: 69 | // http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters 70 | val = val === undefined ? null : decodeURIComponent(val); 71 | 72 | if (!ret.hasOwnProperty(key)) { 73 | ret[key] = val; 74 | } else if (Array.isArray(ret[key])) { 75 | ret[key].push(val); 76 | } else { 77 | ret[key] = [ret[key], val]; 78 | } 79 | 80 | return ret; 81 | }, {}); 82 | }; 83 | 84 | function stringifyURL(obj) { 85 | return obj ? Object.keys(obj).sort().map(function (key) { 86 | var val = obj[key]; 87 | 88 | if (Array.isArray(val)) { 89 | return val.sort().map(function (val2) { 90 | return encodeURIComponent(key) + '=' + encodeURIComponent(val2); 91 | }).join('&'); 92 | } 93 | 94 | return encodeURIComponent(key) + '=' + encodeURIComponent(val); 95 | }).join('&') : ''; 96 | }; 97 | 98 | // gets the language set in the query string 99 | function getLanguageFromQueryString() { 100 | if (location.search.length >= 1) { 101 | var language = parseURL(location.search).language; 102 | if (language) { 103 | return language; 104 | } else if (jQuery.inArray(location.search.substr(1), languages) != -1) { 105 | return location.search.substr(1); 106 | } 107 | } 108 | 109 | return false; 110 | } 111 | 112 | // returns a new query string with the new language in it 113 | function generateNewQueryString(language) { 114 | var url = parseURL(location.search); 115 | if (url.language) { 116 | url.language = language; 117 | return stringifyURL(url); 118 | } 119 | return language; 120 | } 121 | 122 | // if a button is clicked, add the state to the history 123 | function pushURL(language) { 124 | if (!history) { return; } 125 | var hash = window.location.hash; 126 | if (hash) { 127 | hash = hash.replace(/^#+/, ''); 128 | } 129 | history.pushState({}, '', '?' + generateNewQueryString(language) + '#' + hash); 130 | 131 | // save language as next default 132 | localStorage.setItem("language", language); 133 | } 134 | 135 | function setupLanguages(l) { 136 | var defaultLanguage = localStorage.getItem("language"); 137 | 138 | languages = l; 139 | 140 | var presetLanguage = getLanguageFromQueryString(); 141 | if (presetLanguage) { 142 | // the language is in the URL, so use that language! 143 | activateLanguage(presetLanguage); 144 | 145 | localStorage.setItem("language", presetLanguage); 146 | } else if ((defaultLanguage !== null) && (jQuery.inArray(defaultLanguage, languages) != -1)) { 147 | // the language was the last selected one saved in localstorage, so use that language! 148 | activateLanguage(defaultLanguage); 149 | } else { 150 | // no language selected, so use the default 151 | activateLanguage(languages[0]); 152 | } 153 | } 154 | 155 | // if we click on a language tab, activate that language 156 | $(function() { 157 | $(".lang-selector a").on("click", function() { 158 | var language = $(this).data("language-name"); 159 | pushURL(language); 160 | activateLanguage(language); 161 | return false; 162 | }); 163 | }); 164 | })(); 165 | -------------------------------------------------------------------------------- /source/javascripts/app/_search.js: -------------------------------------------------------------------------------- 1 | //= require ../lib/_lunr 2 | //= require ../lib/_jquery 3 | //= require ../lib/_jquery.highlight 4 | ;(function () { 5 | 'use strict'; 6 | 7 | var content, searchResults; 8 | var highlightOpts = { element: 'span', className: 'search-highlight' }; 9 | var searchDelay = 0; 10 | var timeoutHandle = 0; 11 | 12 | var index = new lunr.Index(); 13 | 14 | index.ref('id'); 15 | index.field('title', { boost: 10 }); 16 | index.field('body'); 17 | index.pipeline.add(lunr.trimmer, lunr.stopWordFilter); 18 | 19 | $(populate); 20 | $(bind); 21 | 22 | function populate() { 23 | $('h1, h2').each(function() { 24 | var title = $(this); 25 | var body = title.nextUntil('h1, h2'); 26 | index.add({ 27 | id: title.prop('id'), 28 | title: title.text(), 29 | body: body.text() 30 | }); 31 | }); 32 | 33 | determineSearchDelay(); 34 | } 35 | function determineSearchDelay() { 36 | if(index.tokenStore.length>5000) { 37 | searchDelay = 300; 38 | } 39 | } 40 | 41 | function bind() { 42 | content = $('.content'); 43 | searchResults = $('.search-results'); 44 | 45 | $('#input-search').on('keyup',function(e) { 46 | var wait = function() { 47 | return function(executingFunction, waitTime){ 48 | clearTimeout(timeoutHandle); 49 | timeoutHandle = setTimeout(executingFunction, waitTime); 50 | }; 51 | }(); 52 | wait(function(){ 53 | search(e); 54 | }, searchDelay ); 55 | }); 56 | } 57 | 58 | function search(event) { 59 | 60 | var searchInput = $('#input-search')[0]; 61 | 62 | unhighlight(); 63 | searchResults.addClass('visible'); 64 | 65 | // ESC clears the field 66 | if (event.keyCode === 27) searchInput.value = ''; 67 | 68 | if (searchInput.value) { 69 | var results = index.search(searchInput.value).filter(function(r) { 70 | return r.score > 0.0001; 71 | }); 72 | 73 | if (results.length) { 74 | searchResults.empty(); 75 | $.each(results, function (index, result) { 76 | var elem = document.getElementById(result.ref); 77 | searchResults.append("
  • " + $(elem).text() + "
  • "); 78 | }); 79 | highlight.call(searchInput); 80 | } else { 81 | searchResults.html('
  • '); 82 | $('.search-results li').text('No Results Found for "' + searchInput.value + '"'); 83 | } 84 | } else { 85 | unhighlight(); 86 | searchResults.removeClass('visible'); 87 | } 88 | } 89 | 90 | function highlight() { 91 | if (this.value) content.highlight(this.value, highlightOpts); 92 | } 93 | 94 | function unhighlight() { 95 | content.unhighlight(highlightOpts); 96 | } 97 | })(); 98 | 99 | -------------------------------------------------------------------------------- /source/javascripts/app/_toc.js: -------------------------------------------------------------------------------- 1 | //= require ../lib/_jquery 2 | //= require ../lib/_imagesloaded.min 3 | ;(function () { 4 | 'use strict'; 5 | 6 | var loaded = false; 7 | 8 | var debounce = function(func, waitTime) { 9 | var timeout = false; 10 | return function() { 11 | if (timeout === false) { 12 | setTimeout(function() { 13 | func(); 14 | timeout = false; 15 | }, waitTime); 16 | timeout = true; 17 | } 18 | }; 19 | }; 20 | 21 | var closeToc = function() { 22 | $(".toc-wrapper").removeClass('open'); 23 | $("#nav-button").removeClass('open'); 24 | }; 25 | 26 | function loadToc($toc, tocLinkSelector, tocListSelector, scrollOffset) { 27 | var headerHeights = {}; 28 | var pageHeight = 0; 29 | var windowHeight = 0; 30 | var originalTitle = document.title; 31 | 32 | var recacheHeights = function() { 33 | headerHeights = {}; 34 | pageHeight = $(document).height(); 35 | windowHeight = $(window).height(); 36 | 37 | $toc.find(tocLinkSelector).each(function() { 38 | var targetId = $(this).attr('href'); 39 | if (targetId[0] === "#") { 40 | headerHeights[targetId] = $(targetId).offset().top; 41 | } 42 | }); 43 | }; 44 | 45 | var refreshToc = function() { 46 | var currentTop = $(document).scrollTop() + scrollOffset; 47 | 48 | if (currentTop + windowHeight >= pageHeight) { 49 | // at bottom of page, so just select last header by making currentTop very large 50 | // this fixes the problem where the last header won't ever show as active if its content 51 | // is shorter than the window height 52 | currentTop = pageHeight + 1000; 53 | } 54 | 55 | var best = null; 56 | for (var name in headerHeights) { 57 | if ((headerHeights[name] < currentTop && headerHeights[name] > headerHeights[best]) || best === null) { 58 | best = name; 59 | } 60 | } 61 | 62 | // Catch the initial load case 63 | if (currentTop == scrollOffset && !loaded) { 64 | best = window.location.hash; 65 | loaded = true; 66 | } 67 | 68 | var $best = $toc.find("[href='" + best + "']").first(); 69 | if (!$best.hasClass("active")) { 70 | // .active is applied to the ToC link we're currently on, and its parent