Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Письменов Дмитрий Иванович
/
yourroomads
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 6e2cff76
authored
Jun 01, 2021
by
Vladislav
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#20207 Доработка изменения РК
1 parent
16d4677a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
10 deletions
app/Jobs/ProcessCallAPI.php
app/Service/Requests/Direct/UpdateCampaigns.php
app/Service/Requests/DirectRequest.php
app/Jobs/ProcessCallAPI.php
View file @
6e2cff7
...
...
@@ -55,6 +55,7 @@ class ProcessCallAPI implements ShouldQueue
// если не хватило баллов на все что хотели запросить, то в очередь отправляем новый запрос на получение новых данных
AdsHandler
::
getInstance
(
$this
->
api
)
->
handle
(
$response
);
}
catch
(
\Exception
$e
)
{
\Log
::
debug
(
$e
);
//TODO: надо отдельно выделить ошибки вызовов, за которые списываются баллы
//https://yandex.ru/dev/direct/doc/dg/concepts/errors.html
$limits
->
removeRezerv
(
$this
->
limitId
);
...
...
app/Service/Requests/Direct/UpdateCampaigns.php
View file @
6e2cff7
...
...
@@ -32,15 +32,7 @@ class UpdateCampaigns extends DirectRequest
if
(
$count
<
0
)
return
null
;
//для запросов get ничего не разбиваем, т.к. заранее не знаем сколько чего будет
//для них только после выполнения запроса будет известно есть ли кроме $count еще данные
//а текущий запрос просто устанавливается в $count
//а вот для запросов мутаторов будем разбивать. Но тут уже будет зависеть от запроса
//будем под каждый реализовывать делитель
if
(
!
isset
(
$this
->
params
[
'Page'
])){
$this
->
params
[
'Page'
]
=
[];
}
$this
->
params
[
'Page'
][
'Limit'
]
=
$count
;
return
null
;
}
...
...
app/Service/Requests/DirectRequest.php
View file @
6e2cff7
...
...
@@ -51,7 +51,7 @@ class DirectRequest extends APIRequest {
}
function
getUrl
(){
return
$this
->
url
.
$this
->
getService
(
);
return
$this
->
url
.
strtolower
(
$this
->
getService
()
);
}
function
getBody
(){
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment