PONAPI...teData(3pm)

πŸ“¦
version 0.002012 Β· 2 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

🌸 NAME 🌸

PONAPI::Client::Request::Role::HasRelationshipUpdateData β€” it's a request role, bestie, and what it does is has relationship-update-data. That's the whole vibe. Also this is the 3pm page for the PONAPI...teData manpage (the terminal truncates the name because it simply cannot handle all that main character energy πŸ’…).


✨ VERSION ✨

version 0.002012 πŸŽ€


πŸ’– DESCRIPTION πŸ’–

okay so. This role is literally the sibling of PONAPI::Client::Request::Role::HasData, except it's the glow-up version made specifically for relationship updates. πŸ¦‹

Here's the tea: every other part of the spec is all "give me a hashref, that's it, that's the data." But relationship updates said not today and decided they're flexible. They'll take a hashref of data, sure β€” but they'll also take undef, or an arrayref. It's giving "I contain multitudes." 😭✨

# Replaces the specified relationship(s) with a one-to-one relationship to foo.
$client->update_relationships( ..., data => { type => "foo", id => 4 } );

# Replaces the
$client->update_relationships( ..., data => [ { type => "foo", id => 4 }, { ... } ] );

# Clears the relationship
$client->update_relationships( ..., data => undef );
$client->update_relationships( ..., data => [] );

(and yes, that second comment really does just say # Replaces the and then stop. she left us on read. we love her anyway πŸ™ˆ)

So to run it down: a single hashref = one-to-one, an arrayref = a whole lil collection of relationships, and undef or [] = clearing the relationship entirely. The undef and the empty arrayref both clear it, so pick your fighter. πŸ₯Š

The underlaying repository decides whether the one-to-one or one-to-many difference is significant. (not us, not this role β€” we just pass the data along and mind our business πŸ’…)


πŸ‘‘ AUTHORS πŸ‘‘

  • Mickey Nasriachi <mickey@cpan.org>
  • Stevan Little <stevan@cpan.org>
  • Brian Fraser <hugmeir@cpan.org>

icons. legends. the blueprint. 🫢


This software is copyright (c) 2019 by Mickey Nasriachi, Stevan Little, Brian Fraser.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. periodt. πŸ”₯


perl v5.36.0 🌈 2022-12-07 β€” that's the version and the date, bestie, and that's the whole page. mwah. πŸ’‹πŸŒΈπŸ’–

πŸ“¦ where this page comes from