示例#1
0
        information returned and should be a subset of:
        
        "buyer_company__name, buyer_company__reference, buyer_team__id,
         buyer_team__name, buyer_team__reference, category, company__reference,
         company_name, created_by, created_by_name, created_time, description,
         duration, end_date, filled_date, id, job_type, name,
         num_active_candidates, num_candidates, num_new_candidates,
         owner_user_id, parent_team__id, parent_team__name,
         parent_team__reference, public_url, reference, start_date, status,
         subcategory, title, visibility"

         Default is to return all of the above.
"""
(pgm, ext) = path.splitext(path.basename(sys.argv[0]))
(api, argv) = app_main(pgm, sys.argv[1:], usage)
(popts, args) = parse_request(pgm, argv, usage)
if popts is None: api.clean_exit(1)
if not args or not len(args) == 2:
    stderr ("\n  **Need 'company name' 'team name' **, quoted if needed.\n")
    api.clean_exit(usage_tail(pgm, usage, 1))
company = args[0]
team = args[1]
if popts['request']:
    req = strip_csv(popts['request'])
    request =  req.split(',')
else:
    request = None
(total, joblist) = jobs_managed(api, company, team, request=request,
                                                            save_xml=api.debug)
if total == 0:
    stderr("No jobs currently managed by {0:s}\n".format(company))
示例#2
0
  must have access to the company.

  Company name must be quoted if it contains spaces.

  [OPTIONS]
  -r, --request "list,of,info"
        list should be a comma-seperated list of parameters.  This limits the
        information returned and should be a subset of:

        "reference, status, name, owner_user_id"

        Default is to return all of the above.
"""
(pgm, ext) = path.splitext(path.basename(sys.argv[0]))
(api, argv) = app_main(pgm, sys.argv[1:], usage)
(popts, args) = parse_request(pgm, sys.argv[1:], usage)
if popts is None: api.clean_exit(1)
if not len(args) == 1:
    stderr ("\n  ** Need company name **, quoted if necessary.\n")
    api.clean_exit(usage_tail(pgm, usage, 1))
company = args[0]
if popts['request']:
    req = strip_csv(popts['request'])
    request =  req.split(',')
else:
    request = None
details = company_details(api, company, request=request, save_xml=api.debug)
if not details:
    stderr('failed to fetch company list\n')
    api.clean_exit(1)
print_dict(stdout, details)