Changeset 25117 for trunk/ws.php
- Timestamp:
- Oct 24, 2013, 3:38:12 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ws.php
r25115 r25117 676 676 null, 677 677 array('admin_only'=>true) 678 );678 ); 679 679 680 680 $service->addMethod( … … 693 693 null, 694 694 array('admin_only'=>true) 695 );695 ); 696 696 697 697 $service->addMethod( … … 702 702 null, 703 703 array('admin_only'=>true) 704 ); 704 ); 705 706 $service->addMethod( 707 'pwg.groups.getList', 708 'ws_groups_getList', 709 array( 710 'group_id' => array('default'=>null, 711 'flags'=>WS_PARAM_FORCE_ARRAY, 712 'type'=>WS_TYPE_ID), 713 'name' => array('default'=>null, 714 'info'=>'Use "%" as wildcard.'), 715 'per_page' => array('default'=>100, 716 'maxValue'=>$conf['ws_max_users_per_page'], 717 'type'=>WS_TYPE_INT|WS_TYPE_POSITIVE), 718 'page' => array('default'=>0, 719 'type'=>WS_TYPE_INT|WS_TYPE_POSITIVE), 720 'order' => array('default'=>'name', 721 'info'=>'id, name, nb_users, is_default'), 722 ), 723 '<b>Admin only.</b> Retrieves a list of all groups. The list can be filtered.', 724 null, 725 array('admin_only'=>true) 726 ); 727 728 $service->addMethod( 729 'pwg.groups.add', 730 'ws_groups_add', 731 array( 732 'name' => array(), 733 'is_default' => array('default'=>false, 734 'type'=>WS_TYPE_BOOL), 735 ), 736 '<b>Admin & POST only.</b> Creates a group and returns the new group record.', 737 null, 738 array('admin_only'=>true, 'post_only'=>true) 739 ); 740 741 $service->addMethod( 742 'pwg.groups.delete', 743 'ws_groups_delete', 744 array( 745 'group_id' => array('flags'=>WS_PARAM_FORCE_ARRAY, 746 'type'=>WS_TYPE_ID), 747 ), 748 '<b>Admin & POST only.</b> Deletes a or more groups. Users and photos are not deleted.', 749 null, 750 array('admin_only'=>true, 'post_only'=>true) 751 ); 752 753 $service->addMethod( 754 'pwg.groups.setInfo', 755 'ws_groups_setInfo', 756 array( 757 'group_id' => array('type'=>WS_TYPE_ID), 758 'name' => array('default'=>null), 759 'is_default' => array('default'=>null, 760 'type'=>WS_TYPE_BOOL), 761 ), 762 '<b>Admin & POST only.</b> Updates a group. Leave a field blank to keep the current value.', 763 null, 764 array('admin_only'=>true, 'post_only'=>true) 765 ); 766 767 $service->addMethod( 768 'pwg.groups.addUser', 769 'ws_groups_addUser', 770 array( 771 'group_id' => array('type'=>WS_TYPE_ID), 772 'user_id' => array('flags'=>WS_PARAM_FORCE_ARRAY, 773 'type'=>WS_TYPE_ID), 774 ), 775 '<b>Admin only.</b> Adds one or more users to a group.', 776 null, 777 array('admin_only'=>true) 778 ); 779 780 $service->addMethod( 781 'pwg.groups.deleteUser', 782 'ws_groups_deleteUser', 783 array( 784 'group_id' => array('type'=>WS_TYPE_ID), 785 'user_id' => array('flags'=>WS_PARAM_FORCE_ARRAY, 786 'type'=>WS_TYPE_ID), 787 ), 788 '<b>Admin & POST only.</b> Removes one or more users from a group.', 789 null, 790 array('admin_only'=>true, 'post_only'=>true) 791 ); 792 793 $service->addMethod( 794 'pwg.users.getList', 795 'ws_users_getList', 796 array( 797 'user_id' => array('default'=>null, 798 'flags'=>WS_PARAM_FORCE_ARRAY, 799 'type'=>WS_TYPE_ID), 800 'username' => array('default'=>null, 801 'info'=>'Use "%" as wildcard.'), 802 'status' => array('default'=>null, 803 'flags'=>WS_PARAM_FORCE_ARRAY, 804 'info'=>'guest,generic,normal,admin,webmaster'), 805 'min_level' => array('default'=>0, 806 'maxValue'=>max($conf['available_permission_levels']), 807 'type'=>WS_TYPE_INT|WS_TYPE_POSITIVE), 808 'group_id' => array('default'=>null, 809 'flags'=>WS_PARAM_FORCE_ARRAY, 810 'type'=>WS_TYPE_ID), 811 'per_page' => array('default'=>100, 812 'maxValue'=>$conf['ws_max_users_per_page'], 813 'type'=>WS_TYPE_INT|WS_TYPE_POSITIVE), 814 'page' => array('default'=>0, 815 'type'=>WS_TYPE_INT|WS_TYPE_POSITIVE), 816 'order' => array('default'=>'id', 817 'info'=>'id, username, level, email'), 818 ), 819 '<b>Admin only.</b> Retrieves a list of all the users.', 820 null, 821 array('admin_only'=>true) 822 ); 823 824 $service->addMethod( 825 'pwg.users.add', 826 'ws_users_add', 827 array( 828 'username' => array(), 829 'password' => array('default'=>null), 830 'email' => array('default'=>null), 831 ), 832 '<b>Admin & POST only.</b> Registers a new user.', 833 null, 834 array('admin_only'=>true, 'post_only'=>true) 835 ); 836 837 $service->addMethod( 838 'pwg.users.delete', 839 'ws_users_delete', 840 array( 841 'user_id' => array('flags'=>WS_PARAM_FORCE_ARRAY, 842 'type'=>WS_TYPE_ID), 843 ), 844 '<b>Admin & POST only.</b> Deletes on or more users. Photos owned by this user are not deleted.', 845 null, 846 array('admin_only'=>true, 'post_only'=>true) 847 ); 848 849 $service->addMethod( 850 'pwg.users.setInfo', 851 'ws_users_setInfo', 852 array( 853 'user_id' => array('type'=>WS_TYPE_ID), 854 'username' => array('default'=>null), 855 'password' => array('default'=>null), 856 'email' => array('default'=>null), 857 ), 858 '<b>Admin & POST only.</b> Updates a user. Leave a field blank to keep the current value.', 859 null, 860 array('admin_only'=>true, 'post_only'=>true) 861 ); 705 862 } 706 863
Note: See TracChangeset
for help on using the changeset viewer.