pocytat.ml API




Base url for all requests: http://pocytat.ml/api/api.php?

# Params Description
1 /api/quote/all Returns array of quote objects
2 /api/quote/all?dateFrom=2018-02-16 00:00:00 Returns array of quote objects from specific date. Format Date: YYYY-mm-dd hh-ii-ss
2 /api/quote/all?faculty=WEAiI Returns array of quote objects matching faculty. Allowed options: 'WBiA','WEiZ','WEAiI','WIPiL','WIST','WM','WWFiF'
3 /api/quote/random?ids=12,32 Returns random quote object. Optional ids param to exclude specific quotes from search.
4 /api/quote/single?id=8 Returns quote object by id in database

JSON example return

request=quote

            {
                "code":"200",
                "quote":[
                    {
                        "cytat":"Mo\u017ce na Ukrainie to inaczej si\u0119 cyfry zapisuje, bo tam cyrulica",
                        "wydzial":"WEAiI"
                    }
                ]
            }
            
request=quote&id=8

            {
                "code":"200",
                "quote":[
                    {
                        "cytat":"Do pracy!",
                        "wydzial":"WEAiI"
                    }
                ]
            }
            
request=all

            {
                "code":"200",
                "quote":[
                    {
                        "cytat":"Mo\u017ce na Ukrainie to inaczej si\u0119 cyfry zapisuje, bo tam cyrulica",
                        "wydzial":"WEAiI"
                    },
                    {
                        "cytat":"Skok z okna z 10 pi\u0119tra mo\u017ce doprowadzi\u0107 do \u015bmierci.",
                        "wydzial":"WEAiI"
                    },
                    ...
                ]
            }
            
request=all&dateFrom=2018-02-16 00:00:00

            {
                "code":"200",
                "quote":[
                    {
                        "id":"57",
                        "cytat":"Mam si\u0119 ba\u0107?",
                        "dodano":"2018-02-16 17:03:49",
                        "wydzial":"WEAiI"
                    },
                    {
                        "id":"58",
                        "cytat":"Chwileczk\u0119, bo kolega co\u015b tu do mnie pisze",
                        "dodano":"2018-02-19 21:44:25",
                        "wydzial":"WEAiI"
                    },
                    {
                        "id":"59",
                        "cytat":"Czy Pan za\u017cywa\u0142 jakie\u015b \u015brodki? Bo od pocz\u0105tku
                                zaj\u0119\u0107 nie mam z Panem kontaktu.",
                        "dodano":"2018-02-26 09:56:50",
                        "wydzial":"WEAiI"
                    },
                    ...
                ]
            }
            

Return codes

# Code Description
1 200 Returns response data
2 404 Requested data not found