Example: Difference between revisions

From docs.reasonspace.com
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
Exports are available for both maps and assessments. A map export URL can point to a specific map in revision history, or it can point to the current publication.
Exports are available for both maps and assessments. A map export URL can point to a specific map in revision history, or it can point to the current publication. The base URLs look like:


* <nowiki>https://app.reasonspace.com/arguments/{token}/export</nowiki> points to the current publication
* <nowiki>https://app.reasonspace.com/arguments/{token}/export</nowiki> points to the current publication
Line 5: Line 5:
* <nowiki>https://app.reasonspace.com/assessments/{token}/export</nowiki> points to an assessment
* <nowiki>https://app.reasonspace.com/assessments/{token}/export</nowiki> points to an assessment


The URL can take options for
* embed - causes the URL to fetch an image, rather than trigger a download - use this to show the map as an image in Wikipedia
* dpi - sets the image resolution. Around 72-120 is fine for screens. The larger the number, the larger the image. Doesn't apply to PDF and SVG.
* size - sets the image size - not yet implemented
* hide_objections - an experimental option that will probably go away. true shows the map without objections
* format - Currently supports PDF, SVG, PNG, JPG, and CSV. In order for an embed URL to work in Wikipedia, the URL has to end with something that looks like an image format. Wikipedia isn't smart enough to determine whether the "dot-format" is part of an actual file name, or a param, so it works for the URL to end with "=.png" and Reasonspace tolerates a "dot" in the format name. For Reasonspace. "png" works just as well as ".png", but the "dot" is necessary to trick Wikipedia into thinking that the URL points to an image file.


<nowiki>https://app.reasonspace.com/arguments/{token}/export?options[dpi]=72&options[embed]=true&options[format]=.png</nowiki>
<nowiki>https://app.reasonspace.com/arguments/{token}/export?options[dpi]=72&options[embed]=true&options[format]=.png</nowiki>


[https://app.reasonspace.com/arguments/e0dce61d-5cf8-4d26-9bb7-c1009da5be93 https://app.reasonspace.com/arguments/e0dce61d-5cf8-4d26-9bb7-c1009da5be93/export?options%5Bembed%5D=true&options%5Bdpi%5D=72&options%5Bformat%5D=.png]
[https://app.reasonspace.com/arguments/e0dce61d-5cf8-4d26-9bb7-c1009da5be93 https://app.reasonspace.com/arguments/e0dce61d-5cf8-4d26-9bb7-c1009da5be93/export?options%5Bembed%5D=true&options%5Bdpi%5D=72&options%5Bformat%5D=.png]

Revision as of 22:11, 29 March 2023

Exports are available for both maps and assessments. A map export URL can point to a specific map in revision history, or it can point to the current publication. The base URLs look like:

  • https://app.reasonspace.com/arguments/{token}/export points to the current publication
  • https://app.reasonspace.com/maps/{token}/export points to a specific history map
  • https://app.reasonspace.com/assessments/{token}/export points to an assessment

The URL can take options for

  • embed - causes the URL to fetch an image, rather than trigger a download - use this to show the map as an image in Wikipedia
  • dpi - sets the image resolution. Around 72-120 is fine for screens. The larger the number, the larger the image. Doesn't apply to PDF and SVG.
  • size - sets the image size - not yet implemented
  • hide_objections - an experimental option that will probably go away. true shows the map without objections
  • format - Currently supports PDF, SVG, PNG, JPG, and CSV. In order for an embed URL to work in Wikipedia, the URL has to end with something that looks like an image format. Wikipedia isn't smart enough to determine whether the "dot-format" is part of an actual file name, or a param, so it works for the URL to end with "=.png" and Reasonspace tolerates a "dot" in the format name. For Reasonspace. "png" works just as well as ".png", but the "dot" is necessary to trick Wikipedia into thinking that the URL points to an image file.

https://app.reasonspace.com/arguments/{token}/export?options[dpi]=72&options[embed]=true&options[format]=.png

export?options%5Bembed%5D=true&options%5Bdpi%5D=72&options%5Bformat%5D=.png