Skip to content

Instantly share code, notes, and snippets.

@mstenta
Created March 20, 2019 20:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mstenta/de4d1d3e52986281f18470ec2471c7aa to your computer and use it in GitHub Desktop.
Save mstenta/de4d1d3e52986281f18470ec2471c7aa to your computer and use it in GitHub Desktop.
farmOS API Discussion 2019-03-20

farmOS API Discussion 2019-03-20

Michael Stenta Jamie Gaehring Paul Weidner

Library links:

Questions:

  • What does farmOS.js have that farmOS.py/php don't?
    • Ability to send() records.
    • Ability to delete() records.
    • Specific methods for assets and logs.
    • farm.info() (/farm.json)
  • What do neither have?
    • farm.user
  • Should get() return ALL records by default, or pages of records by default?
    • Yes (farmOS.js already does this)
    • Should have the OPTION to return individual pages
      • There are cases where you will want to process in batches, eg: in PHP or Flask during a page request or API call (don't want to hold up the response)

API docs

  • What should we use? Slate? Mkdocs? Sphinx?
    • We want:
      • Markdown
      • Versioning
      • Examples in different languages
      • ...
  • It can live at api.farmos.org, but should be in the same farmOS.org repo (alongside Mkdocs).
  • Mike can provide hosting for if the limitation of GitHub Pages (one site per repo)
  • Maybe we can move to Netlify later.

Next steps

  1. Paul: add methods/classes to farmOS.py to bring it into sync with farmOS.js.
  2. Paul: automated testing of farmOS.py
    • Think about stadardized tests across libraries
    • pytest? pytest in Github?
  3. Paul: Add user support.
  4. Jamie: Add user support.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment