SocalNick / orchestrate-php-client

A PHP client for Orchestrate.io
BSD 3-Clause "New" or "Revised" License
32 stars 5 forks source link

Get version history of Key/Value #18

Open ghost opened 9 years ago

ghost commented 9 years ago

Is there a way to get the version history of a Key/Value equivalent of this: ?

GET https://api.orchestrate.io/v0/$collection/$key/refs

Thanks so much for creating this, it's been a great help.

SocalNick commented 9 years ago

Good question. Support is not built in, however, you could do something kind of hack-y:

$kvFetchOp = new KvFetchOperation('some-collection', 'some-key', '?');

Passing a question mark for $refs should list them. I think the ideal solution would be to extend KvFetchOperation with a KvFetchRefsOperation class and a corresponding result object. Want to try making a pull request?

ghost commented 9 years ago

I'd love to @SocalNick, but I wouldn't even know where to start :\

If I ever figure out how it works, I will gladly.

P.S. - Being able to get reftime in the result of a fetch would be quite useful as well.