Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
smugmug_api
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
smugmug_api
Commits
0164f11d
Commit
0164f11d
authored
2 months ago
by
Omar Mohamad - El Hassan Lopesino
Browse files
Options
Downloads
Patches
Plain Diff
Revert "Issue
#3285444
: Service to search images"
This reverts commit
7292f388
.
parent
7292f388
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#413251
canceled
2 months ago
Stage: build
Stage: validate
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
smugmug_api.services.yml
+0
-3
0 additions, 3 deletions
smugmug_api.services.yml
src/Service/ImageSearch.php
+0
-72
0 additions, 72 deletions
src/Service/ImageSearch.php
with
0 additions
and
75 deletions
smugmug_api.services.yml
+
0
−
3
View file @
0164f11d
...
...
@@ -8,9 +8,6 @@ services:
smugmug_api.image
:
class
:
Drupal\smugmug_api\Service\Image
arguments
:
[
"
@smugmug_api.client"
,
"
@logger.factory"
]
smugmug_api.image_search
:
class
:
Drupal\smugmug_api\Service\ImageSearch
arguments
:
[
"
@smugmug_api.client"
,
"
@logger.factory"
]
smugmug_api.node
:
class
:
Drupal\smugmug_api\Service\Node
arguments
:
[
"
@smugmug_api.client"
,
"
@logger.factory"
]
...
...
This diff is collapsed.
Click to expand it.
src/Service/ImageSearch.php
deleted
100644 → 0
+
0
−
72
View file @
7292f388
<?php
namespace
Drupal\smugmug_api\Service
;
use
Drupal\Core\Logger\LoggerChannelFactory
;
/**
* Class ImageSearch.
*
* @package Drupal\smugmug_api\Service
*/
class
ImageSearch
{
/**
* Client.
*
* @var \Drupal\smugmug_api\Service\Client
*/
protected
$client
;
/**
* Logger Factory.
*
* @var \Drupal\Core\Logger\LoggerChannelFactory
*/
protected
$loggerFactory
;
/**
* Media constructor.
*
* @param \Drupal\smugmug_api\Service\Client $client
* Client.
* @param \Drupal\Core\Logger\LoggerChannelFactory $loggerFactory
* LoggerChannelFactory.
*/
public
function
__construct
(
Client
$client
,
LoggerChannelFactory
$loggerFactory
)
{
// SmugMug API Client.
$this
->
client
=
$client
;
$this
->
loggerFactory
=
$loggerFactory
;
}
/**
* An image is a photo or video stored on SmugMug.
*
* @param array $arguments
* The search arguments.
* @param bool $cacheable
* Cacheable.
*
* @return array|bool
* Response array.
* https://api.smugmug.com/api/v2/image!search#response
*
* @see https://api.smugmug.com/api/v2/image!search
*/
public
function
searchImages
(
$arguments
=
[],
$cacheable
=
TRUE
)
{
$arguments
[
'Type'
]
=
'Image'
;
$response
=
$this
->
client
->
request
(
'image!search'
,
$arguments
,
$cacheable
);
if
(
$response
)
{
return
$response
[
'Image'
];
}
return
FALSE
;
}
}
This diff is collapsed.
Click to expand it.
Omar Mohamad - El Hassan Lopesino
@mistermoper
mentioned in commit
b40b1755
·
2 months ago
mentioned in commit
b40b1755
mentioned in commit b40b1755dce203d33a0b49928c54e5c3942a6bc1
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment