--
--
You received this message because you are subscribed to the Google
Groups "Meetup API" group.
To unsubscribe from this group, send email to
meetup-api+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/meetup-api?hl=en?hl=en
---
You received this message because you are subscribed to the Google Groups "Meetup API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to meetup-api+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On Mon, Feb 20, 2017 at 5:37 PM, Andrew Murphy <aavm...@gmail.com> wrote:HiThe library I'm using (perl's LWP::UserAgent) just has GET POST DELETE etc. but not PATCHSo its fine for the V2 update eventBut V3 update event uses PATCH..Could it use POST as wellThanksAndrewHi Andrew,Would it work if you constructed an Http::Request ( http://search.cpan.org/~ether/HTTP-Message-6.11/lib/HTTP/Request.pm ) directly? It looks like you can pass the HTTP method directly into that type's constructor. I looks like you can then pass that to instance's of perl's UserAgents.
Thanks for the suggestion. I'll have a try.In the meantime, I also raised an issue with perl's LWP module to add 'PATCH'.Its been accepted, and is targeted for the next release.Andrew
On Sunday, 26 February 2017 19:29:08 UTC, Doug Tangren wrote:On Sun, Feb 26, 2017 at 2:25 PM, Doug Tangren <do...@meetup.com> wrote:On Mon, Feb 20, 2017 at 5:37 PM, Andrew Murphy <aavm...@gmail.com> wrote:HiThe library I'm using (perl's LWP::UserAgent) just has GET POST DELETE etc. but not PATCHSo its fine for the V2 update eventBut V3 update event uses PATCH..Could it use POST as wellThanksAndrewHi Andrew,Would it work if you constructed an Http::Request ( http://search.cpan.org/~ether/HTTP-Message-6.11/lib/HTTP/Request.pm ) directly? It looks like you can pass the HTTP method directly into that type's constructor. I looks like you can then pass that to instance's of perl's UserAgents.Something likerequire HTTP::Request;$request = HTTP::Request->new(PATCH => 'https://api.meetup.com/{your-group}/events/{event_id}');
--
use LWP::UserAgent;use HTTP::Request::Common;use JSON;
$url = "https://api.meetup.com/$MEETUP_GROUP_URL}/events" . ( $s_event_new ? "" : "/$meetup_id" ) ;
#NB: in %fields, $fields{time} is unix_time * 1,000
$ua = LWP::UserAgent->new();
$request = HTTP::Request::Common::PATCH( $url, [ %fields ] );
$response = $ua->request( $request );
$http_status_code = $response->code();
$content = $response->decoded_content();
$data = eval{ from_json ( $content ) };