PluginProbe
ShiftController Employee Shift Scheduling / 4.9.66
ShiftController Employee Shift Scheduling v4.9.66
4.9.97 4.9.96 4.9.95 4.9.74 4.9.75 4.9.76 4.9.77 4.9.78 4.9.84 4.9.85 4.9.87 4.9.91 4.9.92 trunk 2.1.0 2.1.1 2.1.2 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 3.2.4 All 38 releases
← All changes | sh4/api/html/view.html.php +1 -375 4.9.744.9.66 View file →
@@ -130,8 +130,9 @@
130 130 <pre class="sh4-code">
131 131 GET <?php echo $fullUrl; ?>?from=<?php echo $today; ?>0900&to=<?php echo $today; ?>1430&status_id=draft
132 132 </pre>
133 133
134 +
134 135 <h3 class="hc-underline">__Get Shift__</h3>
135 136 <?php
136 137 $url = $startUrl . 'shifts/&lt;id&gt;';
137 138 $fullUrl = get_rest_url( NULL, $url );
@@ -382,379 +383,4 @@
382 383 }
383 384 ]
384 385 }
385 386 </pre>
386 -
387 -<h3 class="hc-underline">__Get All Calendars__</h3>
388 -<?php
389 -$url = $startUrl . 'calendars';
390 -$fullUrl = get_rest_url( NULL, $url );
391 -?>
392 -
393 -<p>
394 -<strong>
395 -GET <?php echo $url; ?>
396 -</strong>
397 -</p>
398 -
399 -<p>
400 -<strong>__Headers__</strong>
401 -</p>
402 -
403 -<p>
404 -X-WP-ShiftController-AuthCode: <?php echo $current['auth_code']; ?>
405 -</p>
406 -
407 -<p>
408 -<strong>__Examples__</strong>
409 -</p>
410 -
411 -<pre class="sh4-code">
412 -GET <?php echo $fullUrl; ?>
413 -</pre>
414 -
415 -<p>
416 -<strong>__Example return__</strong>
417 -</p>
418 -
419 -<pre class="sh4-code">
420 -[
421 - {
422 - "id": "12",
423 - "title": "Barista",
424 - "type": "shift",
425 - "active": "1"
426 - },
427 - {
428 - "id": "13",
429 - "title": "Server",
430 - "type": "shift",
431 - "active": "0"
432 - },
433 - {
434 - "id": "14",
435 - "title": "Holidays",
436 - "type": "timeoff",
437 - "active": "0"
438 - }
439 -]
440 -</pre>
441 -
442 -<h3 class="hc-underline">__Get All Employees__</h3>
443 -<?php
444 -$url = $startUrl . 'employees';
445 -$fullUrl = get_rest_url( NULL, $url );
446 -?>
447 -
448 -<p>
449 -<strong>
450 -GET <?php echo $url; ?>
451 -</strong>
452 -</p>
453 -
454 -<p>
455 -<strong>__Headers__</strong>
456 -</p>
457 -
458 -<p>
459 -X-WP-ShiftController-AuthCode: <?php echo $current['auth_code']; ?>
460 -</p>
461 -
462 -<p>
463 -<strong>__Examples__</strong>
464 -</p>
465 -
466 -<pre class="sh4-code">
467 -GET <?php echo $fullUrl; ?>
468 -</pre>
469 -
470 -<p>
471 -<strong>__Example return__</strong>
472 -</p>
473 -
474 -<pre class="sh4-code">
475 -[
476 - {
477 - "id": "523",
478 - "title": "Alice",
479 - "email": "alice@host.local",
480 - "username": "alice"
481 - },
482 - {
483 - "id": "527",
484 - "title": "Eve",
485 - "email": "eve@host.local",
486 - "username": "eve"
487 - }
488 -]
489 -</pre>
490 -
491 -<h3 class="hc-underline">__Get Calendars For Employee__</h3>
492 -<?php
493 -$url = $startUrl . 'employees/&lt;id&gt;/calendars';
494 -$fullUrl = get_rest_url( null, $url );
495 -
496 -$url2 = $startUrl . 'employees';
497 -$fullUrl2 = get_rest_url( null, $url2 );
498 -?>
499 -
500 -<p>
501 -<strong>
502 -GET <?php echo $url; ?>
503 -</strong>
504 -</p>
505 -
506 -<p>
507 -<strong>__Headers__</strong>
508 -</p>
509 -
510 -<p>
511 -X-WP-ShiftController-AuthCode: <?php echo $current['auth_code']; ?>
512 -</p>
513 -
514 -<p>
515 -<strong>__Examples__</strong>
516 -</p>
517 -
518 -<pre class="sh4-code">
519 -GET <?php echo $fullUrl2; ?>/123/calendars
520 -</pre>
521 -
522 -<h3 class="hc-underline">__Get Employees Eligible For Calendar__</h3>
523 -<?php
524 -$url = $startUrl . 'calendars/&lt;id&gt;/employees';
525 -$fullUrl = get_rest_url( null, $url );
526 -
527 -$url2 = $startUrl . 'calendars';
528 -$fullUrl2 = get_rest_url( null, $url2 );
529 -?>
530 -
531 -<p>
532 -<strong>
533 -GET <?php echo $url; ?>
534 -</strong>
535 -</p>
536 -
537 -<p>
538 -<strong>__Headers__</strong>
539 -</p>
540 -
541 -<p>
542 -X-WP-ShiftController-AuthCode: <?php echo $current['auth_code']; ?>
543 -</p>
544 -
545 -<p>
546 -<strong>__Examples__</strong>
547 -</p>
548 -
549 -<pre class="sh4-code">
550 -GET <?php echo $fullUrl2; ?>/654/employees
551 -</pre>
552 -
553 -<h3 class="hc-underline">__Add Employee To Calendar__</h3>
554 -<?php
555 -$url = $startUrl . 'calendars/&lt;cid&gt;/employees/&lt;eid&gt;';
556 -$fullUrl = get_rest_url( null, $url );
557 -
558 -$url2 = $startUrl . 'calendars';
559 -$fullUrl2 = get_rest_url( null, $url2 );
560 -?>
561 -
562 -<p>
563 -<strong>
564 -POST <?php echo $url; ?>
565 -</strong>
566 -</p>
567 -
568 -<?php
569 -$url = $startUrl . 'employees/&lt;eid&gt;/calendars/&lt;cid&gt;';
570 -$fullUrl = get_rest_url( null, $url );
571 -
572 -$url3 = $startUrl . 'employees';
573 -$fullUrl3 = get_rest_url( null, $url3 );
574 -?>
575 -
576 -<p>
577 -<strong>
578 -POST <?php echo $url; ?>
579 -</strong>
580 -</p>
581 -
582 -<p>
583 -<strong>__Headers__</strong>
584 -</p>
585 -
586 -<p>
587 -X-WP-ShiftController-AuthCode: <?php echo $current['auth_code']; ?>
588 -</p>
589 -
590 -<p>
591 -<strong>__Examples__</strong>
592 -</p>
593 -
594 -<pre class="sh4-code">
595 -POST <?php echo $fullUrl2; ?>/654/employees/123
596 -</pre>
597 -
598 -<pre class="sh4-code">
599 -POST <?php echo $fullUrl3; ?>/123/calendars/654
600 -</pre>
601 -
602 -<h3 class="hc-underline">__Remove Employee From Calendar__</h3>
603 -<?php
604 -$url = $startUrl . 'calendars/&lt;cid&gt;/employees/&lt;eid&gt;';
605 -$fullUrl = get_rest_url( null, $url );
606 -
607 -$url2 = $startUrl . 'calendars';
608 -$fullUrl2 = get_rest_url( null, $url2 );
609 -?>
610 -
611 -<p>
612 -<strong>
613 -DELETE <?php echo $url; ?>
614 -</strong>
615 -</p>
616 -
617 -<?php
618 -$url = $startUrl . 'employees/&lt;eid&gt;/calendars/&lt;cid&gt;';
619 -$fullUrl = get_rest_url( null, $url );
620 -
621 -$url3 = $startUrl . 'employees';
622 -$fullUrl3 = get_rest_url( null, $url3 );
623 -?>
624 -
625 -<p>
626 -<strong>
627 -DELETE <?php echo $url; ?>
628 -</strong>
629 -</p>
630 -
631 -<p>
632 -<strong>__Headers__</strong>
633 -</p>
634 -
635 -<p>
636 -X-WP-ShiftController-AuthCode: <?php echo $current['auth_code']; ?>
637 -</p>
638 -
639 -<p>
640 -<strong>__Examples__</strong>
641 -</p>
642 -
643 -<pre class="sh4-code">
644 -DELETE <?php echo $fullUrl2; ?>/654/employees/123
645 -</pre>
646 -
647 -<pre class="sh4-code">
648 -DELETE <?php echo $fullUrl3; ?>/123/calendars/654
649 -</pre>
650 -
651 -<h3 class="hc-underline">__Get Employee__</h3>
652 -<?php
653 -$url = $startUrl . 'employees/&lt;id&gt;';
654 -$fullUrl = get_rest_url( null, $url );
655 -
656 -$url2 = $startUrl . 'employees';
657 -$fullUrl2 = get_rest_url( null, $url2 );
658 -?>
659 -
660 -<p>
661 -<strong>
662 -GET <?php echo $url; ?>
663 -</strong>
664 -</p>
665 -
666 -<p>
667 -<strong>__Headers__</strong>
668 -</p>
669 -
670 -<p>
671 -X-WP-ShiftController-AuthCode: <?php echo $current['auth_code']; ?>
672 -</p>
673 -
674 -<p>
675 -<strong>__Examples__</strong>
676 -</p>
677 -
678 -<pre class="sh4-code">
679 -GET <?php echo $fullUrl2; ?>/123
680 -</pre>
681 -
682 -<h3 class="hc-underline">__Get Employee By User Id__</h3>
683 -<?php
684 -$url = $startUrl . 'users/&lt;id&gt;/employee';
685 -$fullUrl = get_rest_url( null, $url );
686 -
687 -$url2 = $startUrl . 'users';
688 -$fullUrl2 = get_rest_url( null, $url2 );
689 -?>
690 -
691 -<p>
692 -<strong>
693 -GET <?php echo $url; ?>
694 -</strong>
695 -</p>
696 -
697 -<p>
698 -<strong>__Headers__</strong>
699 -</p>
700 -
701 -<p>
702 -X-WP-ShiftController-AuthCode: <?php echo $current['auth_code']; ?>
703 -</p>
704 -
705 -<p>
706 -<strong>__Examples__</strong>
707 -</p>
708 -
709 -<pre class="sh4-code">
710 -GET <?php echo $fullUrl2; ?>/321/employee
711 -</pre>
712 -
713 -<h3 class="hc-underline">__Create Employee__</h3>
714 -<?php
715 -$url = $startUrl . 'employees';
716 -$fullUrl = get_rest_url( NULL, $url );
717 -?>
718 -
719 -<p>
720 -<strong>
721 -POST <?php echo $url; ?>
722 -</strong>
723 -</p>
724 -
725 -<p>
726 -<strong>__Headers__</strong>
727 -</p>
728 -
729 -<p>
730 -X-WP-ShiftController-AuthCode: <?php echo $current['auth_code']; ?>
731 -</p>
732 -
733 -<p>
734 -<strong>__Arguments__</strong>
735 -</p>
736 -
737 -<p>
738 -<strong>title</strong><br>
739 -<strong>user_id</strong> <em>__optional__</em><br>
740 -<strong>description</strong> <em>__optional__</em><br>
741 -</p>
742 -
743 -<p>
744 -__Either title or user_id required.__ __If user_id is given, it will link the new employee to this WordPress user.__
745 -__If user_id is given without the title, it will create a new employee with this WordPress user's full name as employee's title and link this employee to this user.__
746 -</p>
747 -
748 -<p>
749 -<strong>__Examples__</strong>
750 -</p>
751 -
752 -<pre class="sh4-code">
753 -POST <?php echo $fullUrl; ?>
754 -
755 -title: James
756 -</pre>
757 -
758 -<p>
759 -__If success, it returns the id of the new employee. Otherwise error messages will be given.__
760 -</p>