These are chat archives for collectiveaccess/support

23rd
Jun 2016
CollectiveAccess
@collectiveaccess
Jun 23 2016 00:49
where are you located?
with regards to the viewer, this is a PDF right? Do you have a local media_processing.conf file? Or are you using the stock one?
ericwm
@eriwm
Jun 23 2016 07:02
@collectiveaccess I am located in Cape Town S.A. Yes it is a PDF document I uploaded and I am using the stock conf file.
tsitsibau
@tsitsibau
Jun 23 2016 15:50
hello, i use the api to retrieve a collection's related objects... can i filter them to get only the public? thanks in advance
Stefan
@stefankeidel
Jun 23 2016 15:50
what API are you using?
tsitsibau
@tsitsibau
Jun 23 2016 15:51
hello stefan
i use the service.php file
from providence
Stefan
@stefankeidel
Jun 23 2016 15:52
There are a bunch of service endpoints in there. What's the exact URL you're hitting?
tsitsibau
@tsitsibau
Jun 23 2016 15:52
service.php/item/ca_objects/?id=780
for example...
let me check what i use for collection
Stefan
@stefankeidel
Jun 23 2016 15:53
Ah
tsitsibau
@tsitsibau
Jun 23 2016 15:54
service.php/item/ca_places/?id=2 for places .... etc
Stefan
@stefankeidel
Jun 23 2016 15:54
If you're using the default format there's no way to filter them by access I think. You'd have to make your own format
tsitsibau
@tsitsibau
Jun 23 2016 15:55
the default format? at the response?
Stefan
@stefankeidel
Jun 23 2016 15:55
The default return format is just an attempt to include everything -- if you want something more specific, you'll have to tell it what you want
tsitsibau
@tsitsibau
Jun 23 2016 15:55
can you tell me how?
is there any guide?
tsitsibau
@tsitsibau
Jun 23 2016 15:56
or can i hack the default format and include something more?
Stefan
@stefankeidel
Jun 23 2016 15:57
You could, but you don't want to do that
Your hack would break with every update
tsitsibau
@tsitsibau
Jun 23 2016 15:57
i know...
:worried:
Stefan
@stefankeidel
Jun 23 2016 15:58
Take a look at the "Building advanced requests" section in the article I linked above
tsitsibau
@tsitsibau
Jun 23 2016 15:59
ok... ill give it a try
Stefan
@stefankeidel
Jun 23 2016 15:59
You may also want to look at this API if you're just starting out: http://docs.collectiveaccess.org/wiki/SimpleAPI
That puts the return format configuration on the server side
It's not as flexible but maybe a bit easier to wrap your head around
tsitsibau
@tsitsibau
Jun 23 2016 16:01
(and how can i hack the default return format ?)...
(evil)
tsitsibau
@tsitsibau
Jun 23 2016 16:07
is there any possibility that there is a switch like enable_access_control that does magically what'm looking for... limit all results to public objects?
(thanks for your help)
Stefan
@stefankeidel
Jun 23 2016 16:26
No, there isn't. That wouldn't be hard to implement though -- feel free to file a ticket at http://clangers.collectiveaccess.org and we'll see what we can do
tsitsibau
@tsitsibau
Jun 23 2016 21:39
thanks stefan i opened a ticket
although it would be great if you can help me with this hack... to solve the problem temporarily...