Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow serializers to return hooks and a serializer function. Port all image serializers to use new functionality #630

Merged
merged 23 commits into from
Aug 6, 2020

Conversation

schloerke
Copy link
Collaborator

@schloerke schloerke commented Aug 4, 2020

Now users will be able to register their own image serializers that require preexec and postexec hooks.

  • Added png, jpeg, svg, tiff, bmp, and pdf for the default set.
  • (Also added a tsv serializer)
  • Moved content type to top level argument to allow routes to set the content type of the serializer

No more need to hand coding all of the image serializers and custom searching.

PR task list:

  • Update NEWS
  • Add tests
  • Update documentation with devtools::document()
  • Update vignettes

* serializer_{jpeg, png, bmp, tiff, svg, pdf}()
* Allow serializers to return hooks and a serializer with `hooks_and_serializer()`
* Endpoints and filters now handle serializer output from `hooks_and_serializer()`
@schloerke schloerke marked this pull request as draft August 4, 2020 17:17
@schloerke schloerke marked this pull request as ready for review August 4, 2020 18:59
@schloerke schloerke added this to the v1.0.0 - Next CRAN release milestone Aug 4, 2020
R/serializer.R Outdated Show resolved Hide resolved
R/serializer.R Outdated Show resolved Hide resolved
R/serializer.R Outdated Show resolved Hide resolved
R/serializer.R Outdated Show resolved Hide resolved
R/serializer.R Outdated Show resolved Hide resolved
R/serializer.R Outdated Show resolved Hide resolved
R/serializer.R Outdated Show resolved Hide resolved
R/serializer.R Outdated Show resolved Hide resolved
R/serializer.R Outdated Show resolved Hide resolved
R/serializer.R Outdated Show resolved Hide resolved
R/serializer.R Outdated Show resolved Hide resolved
R/plumber-step.R Outdated Show resolved Hide resolved
R/globals.R Outdated Show resolved Hide resolved
R/plumb-block.R Outdated Show resolved Hide resolved
NEWS.md Show resolved Hide resolved
@cpsievert cpsievert self-requested a review August 5, 2020 19:02
Copy link
Contributor

@cpsievert cpsievert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with suggestions

R/plumber-step.R Outdated Show resolved Hide resolved
schloerke and others added 10 commits August 5, 2020 15:25
Co-authored-by: Carson Sievert <cpsievert1@gmail.com>
Co-authored-by: Carson Sievert <cpsievert1@gmail.com>
https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types

> For example, for any MIME type whose main type is text, the optional charset parameter can be used to specify the character set used for the characters in the data.

Co-authored-by: Carson Sievert <cpsievert1@gmail.com>
@schloerke schloerke merged commit c7ce15a into master Aug 6, 2020
@schloerke schloerke deleted the register_device branch August 6, 2020 17:07
schloerke added a commit that referenced this pull request Aug 7, 2020
* master:
  Add `plumb_api()` and `available_apis()` (#631)
  Allow serializers to return hooks and a serializer function. Port all image serializers to use new functionality (#630)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants