pocytat.ml API




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

# Params Description
1 request=all Returns array of quote objects
2 request=all&dateFrom=2018-02-16 00:00:00 Returns array of quote objects from specific date. Format Date: YYYY-mm-dd hh-ii-ss
3 request=quote Returns random quote object
4 request=quote&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