Questions tagged [restler]

A micro framework that can expose any PHP class and its methods as Pragmatic and/or RESTful API.

Restler is a simple multi-format Web API Server written in PHP. It is open sourced under LGPL license.

258 questions
0
votes
1 answer

How can I get restler to accept multiple routes to a method, but only document one of them?

I'm in the process of fixing up an API, and I'd like to deprecate some old routes. I'm basically moving the endpoints around, but want to encourage new consumers to use the new routes. However, I need to support the old routes for a short period…
Jesse Weigert
  • 4,714
  • 5
  • 28
  • 37
0
votes
1 answer

How do you document restler api endpoints which are implemented in a base class?

Let's say I have a base class and several derived classes. Base class implements a method that I want exposed on all derived classes, but I want to the swagger docs to reflect each class properly. What is the proper way to do this? Or do I have…
Jesse Weigert
  • 4,714
  • 5
  • 28
  • 37
0
votes
1 answer

callbacks in jasmine E2E testing using restler

I am testing restful api's using restler and jasmine nodejs modules . I have created test files to test a single api call and test group of api calls that need input from each other . How can I provide the feedback / output from one such api call to…
Siddharth Sharma
  • 1,653
  • 2
  • 19
  • 35
0
votes
2 answers

What authentication system & database manager should I use when creating a RESTful API using Restler?

Currently I'm creating a RESTful API using Composer packages. I have already found "luracast/restler" which is a very powerful package to create an API. But I'm still looking for a package to manage my database and an authentication system. Here are…
aqwsez
  • 1,487
  • 1
  • 12
  • 14
0
votes
2 answers

Custom base path for Restler?

What's the recommended / supposed way to use a custom base path for Restler when it's not deployed at the root of a domain / subdomain? My site has its own routing and I'm using Restler 3.0 at here: http://www.example.com/api/data/movies When it…
datasn.io
  • 12,564
  • 28
  • 113
  • 154
0
votes
1 answer

Restler 3.0 - Undefined index: BasicAuthentication

When I run my GET /user with basic authentication (see class code below), the username and password are authenticated. But my xml response is:
Notice: Undefined index: BasicAuthentication in…
Kent
  • 1,374
  • 1
  • 15
  • 29
0
votes
2 answers

Pass parameter values into __construct() when using Restler 3's dependency injection container Scope

I've got an application which uses the DIC Pimple to manage dependency injection; that works great when calling certain methods via command line or internally. However, once I try to call them by an API provided by Restler, it begins throwing 500…
Fliggerty
  • 73
  • 7
0
votes
1 answer

Restler 3: 404 on all routes

I am trying to use Restler in a PHP app api, but I am getting a 404 object returned on all requests. I have reviewed the following similar questions: Restler Returns Always Not Found With Or Without Index.php Restler always returns 404: Not…
user1429980
  • 6,872
  • 2
  • 43
  • 53
0
votes
1 answer

Conflict between Composer autoload and EzPublish one

First sorry for my bad English, I'm a French speaker ^^. I'm working with Restler as webservice in my eZpublish framework. When I have installed Restler, I have installed Composer too. In the index file in witch I use Restler methods, and API…
Teddy Kossoko
  • 1,168
  • 3
  • 20
  • 48
0
votes
1 answer

AuthenticationClass needs duplicating with UrlVersioning - Luracast Restler

I would like to have an authenitcation class and also have my APIS versioned without having to duplicate my security code. I have setup restler and added the following to index.php; Defaults::setProperty('useUrlBasedVersioning',…
Madmartigan
  • 260
  • 3
  • 11
0
votes
1 answer

REST service in Restler cannot find any route after deployed to test server

Restler 3.0.0rc6. I have setup a simple REST service in Restler in my local development environment. When I have moved to test server, Restler cannot find ANY route. I have the projects in sync with git via a remote host. I have just pulled the…
David Casillas
  • 1,801
  • 1
  • 29
  • 57
0
votes
2 answers

How can I use restler to make a GET with a Cookie?

I'm trying to make a GET with a Cookie but it's not working in my node.js program. However, the GET works fine from POSTman in chrome. Why could this be? The error I get back is 'Access denied for user anonymous'. I believe that's because this…
Barodapride
  • 3,475
  • 4
  • 25
  • 36
0
votes
1 answer

NODE.js unable to use restful data obtained by restler

I am using restler with NODE.JS to obtain data from a live feed. If I want to just display the whole feed to the screen it works beautifully, however I want to actually grab the feed and filter it down and only issue what is needed. Here is the…
MOLEDesign
  • 488
  • 8
  • 20
0
votes
0 answers

Extending another node module but intercepting results & emitters

I have my own module (lets call it klinquist) that uses restler for its rest calls. Currently, I'm just extending it: var rest = require('restler'); klinquist.prototype.rest = rest; In my node app, I simply call…
klinquist
  • 246
  • 1
  • 4
  • 15
0
votes
1 answer

Is it possible to send a file from a client to restler.file?

Normally restler.post() takes a restler.file(...) object to send a POST. This works if you have the file path on the server. For example: //############################################################################# // Video upload from file…
Adam Mendoza
  • 5,419
  • 2
  • 25
  • 31