Пример #1
0
 /**
  * @SWG\Get(
  *   path="/primo/groups/{id}",
  *   description="Get a list of records belonging to a record group.",
  *   tags={"Primo"},
  *   produces={"application/json"},
  *   @SWG\Response(
  *     response=200,
  *     description="A PrimoRecordGroup"
  *   ),
  *   @SWG\Parameter(
  *     name="id",
  *     in="path",
  *     description="FRBR group id",
  *     required=true,
  *     type="string"
  *   )
  * )
  *
  * @param  PrimoSearch  $search
  * @param  Request  $request
  * @param  int  $id
  * @return Response
  */
 public function getGroup(PrimoSearch $search, Request $request, $id)
 {
     if ($request->get('raw') == 'true') {
         return response()->make($search->getGroup($id, $request), 200, ['Content-Type' => 'application/xml']);
     }
     return $this->handleErrors(function () use($search, $request, $id) {
         return $search->getGroup($id, $request);
     });
 }
Пример #2
0
 public function __construct(PrimoServices $primo, AlmaClient $alma, Http $http)
 {
     parent::__construct($primo, $alma);
     $this->defaultCover = url('assets/no_cover.jpg');
     $this->http = $http;
 }