zachfeldman / rubypress

Ruby interface for the WordPress XMLRPC API. Follows standard XML-RPC Documentation closely.
201 stars 55 forks source link

Example of passing options #60

Closed XXChester closed 4 years ago

XXChester commented 6 years ago

I was wondering if someone can add an example of how to pass options through the gem. I know with wp.getOptions we can list all of them but if I try for example the following nothing is returned:

  options = {
      media: {
        :thumbnail_size_w => 291,
        :thumbnail_size_h => 194,
      }
    }

Please note I have tried it without the media wrapper as well to no avail. I know you can use the filtering via this which works:

  options = {
      :filter => {
        :order => 'desc',
      },
    }

So the above leads me to believe I am very close but missing something. Any suggestions? Also it would be good to add this to the docs IMO.

zachfeldman commented 6 years ago

Which call are you trying to pass them with?

XXChester commented 6 years ago

I guess that would help :laughing: . I am using the getPosts call to retrieve blogs.

zachfeldman commented 6 years ago

@XXChester I'm not sure media is an option. See the docs: https://codex.wordpress.org/XML-RPC_WordPress_API/Posts#wp.getPosts