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

Builder for events request #16

Merged
merged 1 commit into from
Nov 22, 2017

Conversation

OndraM
Copy link
Member

@OndraM OndraM commented Nov 21, 2017

Only item-property support is implemented in the builder (interactions and user merges are missing so far - will be implemented later).

Example usage is similar as in #15:

$matej = new Matej('foo', 'apikey');

$response = $matej->request() // not yet implemented in the Matej class
    ->events()
    ->addItemProperty(ItemProperty::create('1337', ['valid_from' => time(), 'title' => 'Title']))  // add just one command
    ->addItemProperties([
        ItemProperty::create('666', ['valid_from' => time()]),
        UserMerge::targetUserFromSourceUser('target-id', 'source-id'),  // command not yet implemented
        Interaction::view('user-id', 'item-id'),  // command not yet implemented
    ])  // add multiple commands
    ->send();

Copy link
Contributor

@foglcz foglcz left a comment

Choose a reason for hiding this comment

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

I love it!
Beware of possible API changes if master api sig gets changed thanks to
#15 (comment)

@OndraM OndraM force-pushed the feature/item-properties-builder branch from 390dc1e to 71f0f5e Compare November 22, 2017 10:09
@OndraM OndraM changed the base branch from feature/request-builder to master November 22, 2017 10:09
@OndraM OndraM merged commit 79b570e into lmc-eu:master Nov 22, 2017
@OndraM OndraM added this to the 0.9 milestone Nov 23, 2017
@OndraM OndraM deleted the feature/item-properties-builder branch January 15, 2024 13:27
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.

4 participants