wp-net / WordPressPCL

This is a portable library for consuimg the WordPress REST-API in (almost) any C# application
MIT License
340 stars 130 forks source link

What is the most effective way of adding new property to Post model? #270

Closed piotrstarzynski closed 3 years ago

piotrstarzynski commented 3 years ago

Hello, I would love to include few additional fields to Post model. Mostly they are default ones as soon as you activate Yoast plugin (for example yoast_head). How to add this to query and Post model?

ThomasPe commented 3 years ago

Easiest way for now would be to use the CustomRequest feature where you can provide your own post class implementation: https://github.com/wp-net/WordPressPCL/wiki/CustomRequest

piotrstarzynski commented 3 years ago

It works like a charm. Thank You!