Agza Boluň
    Dünýä Türkmenleriniň birleşen nokady

Kämilleşdirijiler

Kämilleşdirijiler (web dizaýnerler) E-Dostluk saýtynda täze bir programjyk gurup, düzüp bilerler. Düzen programjygyňyzyň işlew hosty siziň serweriňiziň kontrolynda bolar.

Programjyk (App) Düzmek

E-Dostluk saýty bilen täsirleşmek üçin siziň programjygyňyz API-mize baglanyp, bazamyza maglumat iberip ýa-da bazamyzdan maglumat talap edip biler.

Saýtymyzda her düzen programjygyňyz üçin bir PROG ID nomeri berler. Programjyk düzmek üçin şu salgyny yzarlaň: Programjyk (App) Düz

Jeton Talap Etmek

Programjygyňyzy guransoň, API-mize baglanmak ýa-da täsirleşmek üçin ilki bilen JETON talap etmelisiňiz. Jeton talap etmek üçin bolsa, size iberen KEY açarymyz gereklidir. Biz muny size $_GET['key'] arkaly iberýäs.
Jeton talap etmek üçin bir mysal:
http://www.e-dostluk.com/token.php?key=$_GET['key']
Eger talabyňyz üstünlikli kabul edilse, onda şuňa meňzeş bir JSON jogaby (Jawa Skript) alarsyňyz:
Object
(
    [token] => LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUc4d0RRWUpLb1pJaHZjTkFRRUJCUUFEWGdBd1d3SlVBdHFZdmVWOXFEdDd6NFhXTXYzS3VZM2JyWXpUKzR0VgpBbERrN1dQWjhqRVpoVzBNWjE1Z3lHdGNlNm5ueFRNenp4SXpHM29BRVIzc0JVRCtYdStHb21JeVV4UE1RN1NtCkVPdFg0ZTNwekp6R081cUxBZ01CQUFFPQotLS0tLUVORCBQVUJMSUMgS0VZLS0tLS0K
)

Serwerimize Talap Ibermek

Bizden bir ýörgünli jeton alansoň, indi siz, biziň serwerimize baglanma talaby soramalysyňyz. Her talabyňyz üçin, size berlen ýörgünli jetonyňyzy ulanyň.
Biziň API serwerimize baglanma talaby üçin bir mysal:
http://www.e-dostluk.com/api.php?token=#{TOKEN}&method=#{METHOD_NAME}

API Jogaby (Düşündiriş)

Birden köp predmetler üçin ulanyljak talap usullaryna iberýän jogaplarymyzda jemi predment we sahypa sanawyny görkezýän indikator bolar. Iberen jogabymyzda iň köp 10 predment görkeziler. Indiki 10 predment üçin parametry "page=2" edip geçmelisiňiz.

Çep tarapyňyzdaky menuda API systemamyzdan talap edip biljek funksiýalar(işlewler) görkezilendir. Şol funksiýa basyň we programjygyňyzda ulanyp biljek usullara bir göz aýlaň.
*** Goranyş sazlamalary we serwer işlewleri sebäpli siziň talaplaryňyz diňeje şol funkisaýalar bilen limitlenendir.

friend
getFriends
GET /api.php?method=friend.getFriends&user_id=#{USER_ID}
Gets a full list of friends for a specific user. If you do not pass the #{USER_ID} we will return information about the user that is currently logged in.
Jogap
Object
(
    [api] => Object
        (
            [total] => 1
            [pages] => 0
            [current_page] => 0
        )

    [output] => Array
        (
            [0] => Object
                (
                    [user_id] => 7
                    [user_name] => jane-doe
                    [full_name] => Jane Doe
                    [joined] => 1314110027
                    [country_iso] => US
                    [gender] => Female
                    [photo_50px] => http://www.e-dostluk.com/file/pic/user/7_50.jpg
                    [photo_50px_square] => http://www.e-dostluk.com/file/pic/user/7_50_square.jpg
                    [photo_120px] => http://www.e-dostluk.com/file/pic/user/7_120.jpg
                    [photo_original] => http://www.e-dostluk.com/file/pic/user/7.jpg
                    [profile_url] => http://www.e-dostluk.com/index.php?do=/jane-doe/
                )

        )

)
isFriend
GET /api.php?method=friend.isFriend&user_id=#{USER_ID}&friend_user_id=#{FRIEND_USER_ID}
Checks if 2 users are friends or not. If you do not pass the #{USER_ID} we will return information about the user that is currently logged in.
Jogap
Object
(
    [api] => Object
        (
            [total] => 0
            [pages] => 0
            [current_page] => 0
        )

    [output] => Object
        (
            [is_friend] => 1
        )

)
mail
getNewCount
GET /api.php?method=mail.getNewCount&user_id=#{USER_ID}
Get the total number of unseen messages. If you do not pass the #{USER_ID} we will return information about the user that is currently logged in.
Jogap
Object
(
    [api] => Object
        (
            [total] => 0
            [pages] => 0
            [current_page] => 0
        )

    [output] => 1
)
notification
getNewCount
GET /api.php?method=notification.getNewCount&user_id=#{USER_ID}
Okalmadyk täzelikleriň jemi sanyny al. Eger-de siz #{USER_ID} geçmeseňiz, onda biz şuwagt saýta giren agzamyz hakynda informasiýa beriris.
Jogap
Object
(
    [api] => Object
        (
            [total] => 5
            [pages] => 0
            [current_page] => 0
        )

    [output] => 5
)
get
GET /api.php?method=notification.get&user_id=#{USER_ID}
Meni hemme agzalaryň täzeliklerinden habarly tut. Eger-de siz #{USER_ID} geçmeseňiz, onda biz şuwagt saýta giren agzamyz hakynda informasiýa beriris.
Jogap
Object
(
    [api] => Object
        (
            [total] => 0
            [pages] => 0
            [current_page] => 0
        )

    [output] => Array
        (
            [0] => Object
                (
                    [notification_id] => 3
                    [link] => http://www.e-dostluk.com/john-doe/comment-id_1/
                    [message] => Jane Doe commented on your wall
                    [icon] => http://www.e-dostluk.com/module/blog/static/image/default/default/activity.png
                )

        )

)
photo
addPhoto
POST /api.php?method=photo.addPhoto&photo=#{@FILE_PATH;TYPE=MIME_TYPE}&photo_name=#{BASE_FILE_NAME}
Uploads a photo on behalf of the user.
Jogap
Object
(
    [api] => Object
        (
            [total] => 0
            [pages] => 0
            [current_page] => 0
        )

    [output] => Object
        (
            [original] => http://www.e-dostluk.com/file/pic/photo/2011/08/39740c5e356fdd6f66cfc973d4aebf6d.jpg
            [75px] => http://www.e-dostluk.com/file/pic/photo/2011/08/39740c5e356fdd6f66cfc973d4aebf6d_75.jpg
            [100px] => http://www.e-dostluk.com/file/pic/photo/2011/08/39740c5e356fdd6f66cfc973d4aebf6d_100.jpg
            [150px] => http://www.e-dostluk.com/file/pic/photo/2011/08/39740c5e356fdd6f66cfc973d4aebf6d_150.jpg
            [240px] => http://www.e-dostluk.com/file/pic/photo/2011/08/39740c5e356fdd6f66cfc973d4aebf6d_240.jpg
            [500px] => http://www.e-dostluk.com/file/pic/photo/2011/08/39740c5e356fdd6f66cfc973d4aebf6d_500.jpg
            [1024px] => http://www.e-dostluk.com/file/pic/photo/2011/08/39740c5e356fdd6f66cfc973d4aebf6d_1024.jpg
        )

)
getPhotos
GET /api.php?method=photo.getPhotos&user_id=#{USER_ID}
Agzanyň ähli suratyny al. If you do not pass the #{USER_ID} we will return information about the user that is currently logged in.
Jogap
Object
(
    [api] => Object
        (
            [total] => 1
            [pages] => 0
            [current_page] => 0
        )

    [output] => Array
        (
            [0] => Object
                (
                    [photo_100px] => http://www.e-dostluk.com/file/pic/photo/c81e728d9d4c2f636f067f89cc14862c_100.jpg
                    [photo_240px] => http://www.e-dostluk.com/file/pic/photo/c81e728d9d4c2f636f067f89cc14862c_240.jpg
                    [photo_original] => http://www.e-dostluk.com/file/pic/photo/c81e728d9d4c2f636f067f89cc14862c.jpg
                )

        )

)
user
getUser
GET /api.php?method=user.getUser&user_id=#{USER_ID}
Get information about a user based on the user ID# you pass. If you do not pass the #{USER_ID} we will return information about the user that is currently logged in.
Jogap
Object
(
    [api] => Object
        (
            [total] => 0
            [pages] => 0
            [current_page] => 0
        )

    [output] => Object
        (
            [user_id] => 1
            [user_name] => john-doe
            [joined] => 1314109907
            [gender] => Male
            [country_iso] => US
            [full_name] => John Doe
            [email] => john.doe@site.com
            [photo_50px] => http://www.e-dostluk.com/file/pic/user/2011/08/9d673759d1cf55c9cd0b0805dc32e68e_50.jpg
            [photo_50px_square] => http://www.e-dostluk.com/file/pic/user/2011/08/9d673759d1cf55c9cd0b0805dc32e68e_50_square.jpg
            [photo_120px] => http://www.e-dostluk.com/file/pic/user/2011/08/9d673759d1cf55c9cd0b0805dc32e68e_120.jpg
            [photo_original] => http://www.e-dostluk.com/file/pic/user/2011/08/9d673759d1cf55c9cd0b0805dc32e68e.jpg
            [profile_url] => http://www.e-dostluk.com/index.php?do=/john-doe/
        )

)