Category : api

I have an API managing products. One of my endpoint will fetch data from another API and returns the data to the user (in order to complete it if needed). At this point, data are not saved into my database and I don’t want the user to be able to do anything else than POST ..

Read more

Im working on Symfony and try with google map api v3. I can view the route information between two points with the code below. I need to send each point on the route to a form under the route information. How can I do this? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> ..

Read more

I need to get a Key in the response header but with Symfony’s RestClient I do not have it : $restClient = $this->container->get(‘circle.restclient’); $serviceResponse = $restClient->get($endpoint, array(CURLOPT_HTTPHEADER => $this->getHeader())); var_dump($serviceResponse); die(); The result : object(SymfonyComponentHttpFoundationResponse)#1151 (6) { ["headers"]=> object(SymfonyComponentHttpFoundationResponseHeaderBag)#1152 (5) { ["computedCacheControl":protected]=> array(2) { ["no-cache"]=> bool(true) ["private"]=> bool(true) } ["cookies":protected]=> array(0) { } ["headerNames":protected]=> array(3) ..

Read more

I am using custom endpoint with custom controller in api platfrom for media object. Looking for validation for image like image size and Image Type. https://api-platform.com/docs/core/file-upload/ But it is give Error "Cannot autowire argument $data" class MediaObject { /** * @var File|null * * @AssertNotNull(groups={"media_object_create"}) * @AssertFile( * mimeTypes = {"image/jpeg", "image/jpg", "image/png"}, * groups={"media_object_create"}, ..

Read more

I am trying to use the cdaguerre/php-trello-api in order to interface my Symfony app with Trello. I am using key and token. I have taken the API key from https://trello.com/app-key. I have taken the token by https://trello.com/1/authorize?expiration=never&scope=read,write,account&response_type=token&name=Server%20Token&key=<api_key> Now, I use the following way for interfacing with Trello API, according to the documentation of the cdaguerre/php-trello-api ..

Read more